Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set meta tage for controller/action from config file? #232

Open
yshmarov opened this issue Oct 28, 2021 · 1 comment
Open

set meta tage for controller/action from config file? #232

yshmarov opened this issue Oct 28, 2021 · 1 comment

Comments

@yshmarov
Copy link

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

@kpumuk
Copy link
Owner

kpumuk commented Aug 5, 2022

You can utilize i18n for this, similar to what #83 suggests. I am still looking for a good approach to implement it as core functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants