Project

seo_pages

0.0
No commit activity in last 3 years
No release in over 3 years
Web interface to manage your pages title, meta description and meta keywords
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 4.0.0
 Project Readme

SEO Pages

Provides an easy way to manage your pages title, meta description and meta keywords. You can set default values to be used if the SEO is not set for a page.

Installation

Update your Gemfile

gem 'seo_pages'  

Then run bundle install

bundle install

After installation

rake seo_pages:install:migrations
rake db:migrate

You will need to provide a before_action require_admin in an initializer.

Create a file seo_initializer.rb in config/initializers directory

module SeoPages
  class ApplicationController < ActionController::Base

    def require_seo_admin
        redirect_to(root_path) unless current_user.admin?
    end
    
  end
end  

Mount the engine in your routes.rb

mount SeoPages::Engine => "/seo"

In you browser visit the url "/seo", you can edit the Default values for title, meta description and meta keywords.

Alt text Alt text

You can add a new SEO page, by providing the url identifier and the related title, meta description and meta keywords.

Alt text

In application layout, add the following code.

%html
  %head
    = seo_page

You can easily override the SEO page functionality in application.html.haml. In the view you want to add custom SEO.

- seo_page_title("My Cool Engine")
- seo_page_meta_description("My cool description")
- seo_page_meta_keywrods("keywords keywords keywords keywords")

Version 1.3.2

Added regular expression matcher for url identifier. First Match will be selected.