A helper that allows you to write meta tags for SEO purposes. If you set the same tag twice, the later defined tag will override.
Add this line to your application's Gemfile:
gem 'seo-meta-tags'
And then execute:
$ bundle
Or install it yourself as:
$ gem install seo-meta-tags
seo-meta-tags gives you the ability to add a meta tag to a collection which can be rendered out later. To add a tag to the collection you can use
meta_tag(property, content)
For example to set the keywords, and description tags we would do
meta_tag('description', 'A Beautiful Description')
meta_tag('keywords', 'keyword1, keyword2, keyword3')
There is a special helper for rendering the title
title('My Site Title')
At this point no tags have been rendered.. To do so, use the meta_tags info
meta_tags
At some point in the future I plan to add
[ ] Auto og: tag generation based on other tags
- Fork it ( https://github.com/markgandolfo/seo-meta-tags/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request