/canonical-rails

Canonical tag helper to aid Rails SEO

Primary LanguageRubyMIT LicenseMIT

CanonicalRails

This project rocks and uses MIT-LICENSE, foh sho. Works with rails 3 and 4.

A number of articles exist explaining the issue concisely and at length:

Challenge

I've seen a lot of folks do more harm by neglecting canonicalization altogether than by applying to narrowly and conservatively, so here is an attempt to let people start modestly without spending too much time on it and whitelist parameters as they need to.

Install

gem 'canonical-rails', :git => 'git://github.com/jumph4x/rails-canonical.git'

Usage

First, generate the config

rails g canonical_rails:install

Then find it in config/initializers/ as canonical_rails.rb

Finally, include the canonical_tag helper in your views.