Project

seo_sensei

0.0
No commit activity in last 3 years
No release in over 3 years
Make your Rails application SEO-friendly
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 3.7, >= 3.7.0

Runtime

= 2.11.1
>= 5.2.3
 Project Readme

Seo Sensei

The Seo Sensei gem is a wrapper for meta-tags which allows to easily set meta tags inside your Rails application without extra configuration.

Installation

gem install seo_sensei

Usage

Update your layout and in the head section render meta tags:

= display_meta_tags

Update your translations and create seo section for your controllers:

en:
  seo:
    articles:
      index:
        title: 'This is articles page'

Make it happen in your controller:

class ArticlesController < ApplicationController
  enable_seo

  def index

  end
end

Custom information

If you want to display unique title for your article you can do this using the following code:

class ArticlesController < ApplicationController
  def show
    seo_tags_with(@article)
  end
end

then update translations:

en:
  seo:
    articles:
      show:
        title: 'This is article page - %{title}'

If you don't want to index given page, you can call disable_seo:

class ArticlesController < ApplicationController
  disable_seo
end

TODO

  • Make it easier to include assocation with soeable model in a Rails model

Copyright

Copyright (c) 2019 Paweł Dąbrowski. See LICENSE for details.