meta-tags
meta-tags copied to clipboard
set meta tage for controller/action from config file?
Today I was adding meta-tags to an existing app, and had to modify 50+ controllers & actions - a lot.
...so I thought: what If we could set meta tags from a config file?
Something like this:
meta_tags.rb
controller: "users" do
action: "index" do
title: "All users"
end
action: "show" do
title: [user.first_name, "name"],
description: "hello world"
end
end
What do you think about it? :)
You can utilize i18n for this, similar to what https://github.com/kpumuk/meta-tags/issues/83 suggests. I am still looking for a good approach to implement it as core functionality.