質問

Are there recommendations for a gem to handle the meta keywords and meta descriptions in a rails app? I already have friendly_id in place after much trouble but would like to have a good way to add meta tags and descriptions without having to hardcode those in my code.

Anyone have experience with a good meta keyword and description gem for Rails that I could use to facilitate in this task?

役に立ちましたか?

解決

I'm using this[1], much simple, how everything needs be!

Hugs!

[1] https://github.com/lassebunk/metamagic

他のヒント

A well-documented gem for meta tags is at https://github.com/kpumuk/meta-tags

In your view or controller, use

set_meta_tags :title => 'Member Login', :keywords => 'find this'

And then in your layout file:

<head>
  <%= display_meta_tags %>
</head>

You can also use it for Open Graph meta tags.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top