meta-tags icon indicating copy to clipboard operation
meta-tags copied to clipboard

set meta tage for controller/action from config file?

Open yshmarov opened this issue 3 years ago • 1 comments

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? :)

yshmarov avatar Oct 28 '21 15:10 yshmarov

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.

kpumuk avatar Aug 05 '22 21:08 kpumuk