Rails 3 page keywords & description
I have a model Page
with additional fields keywords
and开发者_Go百科 description
for SEO.
How to implement the SEO functionality in Rails and add meta
tags with keywords and description on every page?
You might want to have a look at two plugins:
https://github.com/mokolabs/headliner
https://github.com/lassebunk/metamagic
And read about other SEO techniques for Rails applications here:
http://lassebunk.dk/2011/03/09/rails-seo-pack/
I guess you are storing separate keywords and description for each page in your Page model.
You make a layout that is available for all your pages, that shows instance variables (formatted the way you want them) @keywords and @description.
精彩评论