Ruby Social Networking Plugins

Rails SEO Plugins That Empower the Ruby on Rails Portal!

Any kind of website or web portal that runs on SEO principles needs to have content that makes the ‘big bucks’. Not only that, SEO techniques helps to streamline the content that is uploaded and also to make it worthwhile in the long run.

No one wants to have content that does not properly feature better in high-ranking SERPs results or that isn’t marketed well according to industry-oriented keywords.

This is where plugins for Ruby on Rails plugins come in. Not only do they empower your Rails installation, but they also help to optimize your website with the help of some neatly-crafted SEO plugins that streamline the errors in your website and helps to iron them out.

Here is some Ruby on Rails plugins for SEO that help to make your site feature prominently in search engine results and work better according to SEO (Search Engine Optimization) practices:

1)      Naming Titles Using ‘Headliner’

Headliner is a brilliant ROR (Ruby on Rails) plugin for creating specific titles within a <title> tag. The plugin also makes it very easy to define your titles in one go rather than having to define it at multiple places in a website.

Title selection is critical in building a website since a suitable title features better in SERP results because search engines sniff data according to the titles submitted to them.

Here is how to name titles in your webpage:

In your application.html.erb:

<head>

<%= title :site => “My Awesome Site”,

:separator => “—”,

:reverse => true %>

</head>

 

In your view:

<h1><%= title “Contact info” %></h1>

Would generate the following:

<head>

<title>Contact info — My Awesome Site</title>

</head>

2)      Naming Meta-Tags With Metamagic

Metamagic helps to generate meta-tags within ROR. The description in your meta-tag helps the search engine as well as website visitor to quickly identify what your content has within it and whether it is worth a read or not? Neatly crafted meta-tags help to locate your webpage faster and market it better.

How to generate meta-tags within ROR:

In your application.html.erb:

<head>

<%= metamagic :title => @title %>

</head>

(the:title => @title part is too automatically to retrieve the title from the Headliner plugin within ROR)

In your view:

<% meta :description => “This is my page description.”,

:keywords => “one, two, three” %>

This code generates the following meta-tags:

<head>

<meta name=”title” content=”Page title set using Headliner” />

<meta name=”description” content=”This is my page description.” />

<meta name=”keywords” content=”one, two, three” />

</head>

3)      Generation Of Breadcrumbs (Page Paths) With Gretel

Gretel helps to generate breadcrumbs that help to identify the ‘path’ or direct link to your webpage. Sometimes search engines display the breadcrumb instead of the lengthy URL to help you identify what page it exactly is.

How to generate a breadcrumb within ROR:

In your application.html.erb:

<body>

<div id=”breadcrumb”>

<%= breadcrumb :pretext => “You are here:”,

:separator => “›”,

:autoroot => true,

:show_root_alone => false,

:link_last => false %>

</div>

</body>

In config/initializers/breadcrumbs.rb:

Gretel::Crumbs.layout do

crumb :root do

linkHome, root_path

end

crumb :articles do

linkArticles“,articles_path

end

crumb :article do |article|

linkarticle.title, article_path(article)

parent :articles

end

end

In your controller:

def show

@article = Article.find(params[:id])

end

In your view:

<% breacrumb :article, @article %>

This code generates a simple breadcrumb like this automatically:

<div id=”breadcrumb”>

You are here: <a href=”/”>Home</a> › <a href=”/articles”>Articles</a> › My Article

</div>

4)      Making User-Friendly URLs with FriendlyId

This plugin helps to make simple, yet effective URLs for your website so that the user does not get flummoxed by a really lengthy URL especially when he wants to type in the URL for a quick hit.

How to generate such friendly URLs with Friendly Id:

In your model:

class Article <ActiveRecord::Base

has_friendly_id :title,

:use_slug => true,

:approximate_ascii => true

end

In your controller:

def create

@article = Article.create(:title => “My awesome article”)

redirect_toarticle_path(@article) # => /articles/my-awesome-article

end

5)      Generating Sitemaps With The Help Of Dynamic Sitemaps

Sitemaps are like a detailed map of your website and its every page. It helps to quickly locate a page just like you locate a place on a map with the help of co-ordinates.

The Dynamic Sitemaps ROR plugin generates sitemaps according to the sitemaps.org specifications in the XML format which are easy to read and decode.

How to Generate Sitemaps with Dynamic Sitemaps Plugin in ROR:

In config/initializers/sitemap.rb:

Sitemap::Map.draw do

urlroot_url, :last_mod =>DateTime.now, :change_freq => ‘daily’, :priority => 1

urlabout_url, :change_freq => ‘monthly’, :priority => 0.5

urlcontact_url, :change_freq => ‘monthly’, :priority => 0.5

urlterms_url, :change_freq => ‘monthly’, :priority => 0.5

autogenerate :articles, :last_mod => :updated_at, :change_freq => ‘weekly’, :priority => 0.8

end

This could will generate an automatic sitemap like this one:

<urlsetxmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>

<url>

<loc>http://yourdomain.com/</loc>

<lastmod>2011-03-09</lastmod>

<changefreq>daily</changefreq>

<priority>1</priority>

</url>

</urlset>

To sum up, if you want perfect content that ranks higher than your competition in the SERPs results, these plugins will help you do that with very basic knowledge about ROR. Not only that, your web code will also become more neat and comprehensible after using these plugins which will help web crawlers to sniff your website better and identity they keywords you want it to feature in search engine results.