github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

relevance / seo_helper

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 28
    • 2
  • Source
  • Commits
  • Network (2)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A few helpers to make SEO a little easier — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

tweak formatting 
rsanheim (author)
Sat Jul 19 14:56:07 -0700 2008
commit  ed1cda64cfeda7542d98b605b7f8cab4430b8510
tree    852c0cc191ea302d01d396488d065ebe96ef5739
parent  fa16184619d24a9c1c135b700fd88424df0f0c7d
seo_helper /
name age
history
message
file MIT-LICENSE Fri Apr 11 10:07:38 -0700 2008 move from svn [gdagley]
file README Sat Jul 19 14:56:07 -0700 2008 tweak formatting [rsanheim]
file Rakefile Loading commit data...
file init.rb
file install.rb
directory lib/
directory test/
file uninstall.rb
README
SeoHelper
===============

These are some simple little helper to make pages a little more SEO friendly.

Examples
========

page_title

  - should create a title with h1
  
      page_title('Hello World') => <h1>Hello World</h1>
  
  - should create a title with an alternate tag
  
      page_title('Hello World', :h3) => <h3>Hello World</h3>
  
  - should set the content for html page title

      see discussion for html_title that follows

html_title

  - should create an html title

      html_title('SiteName') => <title>SiteName</title>
  
  - should create an html title with content for html page title
  
      index.html.erb  
        page_title('My Index')
    
      application.html.erb
        html_title('SiteName') => <title>My Index : SiteName</title>

  - should create an html title specified delimiter
  
      index.html.erb  
        page_title('My Index')
  
      application.html.erb
        html_title('SiteName', '|') => <title>My Index | SiteName</title>
  
meta_tags
  - should create meta tags from a hash
  
      meta = {:description => 'This is the description', :keywords => 'these are keywords'}
      meta_tags(meta) => 
        <meta name="keywords" content="these are keywords" />
        <meta name="description" content="This is the description" />

breadcrumb_trail
  - should create a breadcrumb trail
  
      crumbs = [{:name => 'Home', :link => 'http://test.host/'},
                {:name => 'Shops'}]
      breadcrumb_trail(crumbs).should => 
        <div class="breadcrumbs"><a href="http://test.host/">Home</a> &gt; Shops</div>
  
  - should create a breadcrumb trail with a specified tag

      crumbs = [{:name => 'Home', :link => 'http://test.host/'},
                {:name => 'Shops'}]
      breadcrumb_trail(crumbs, :span).should => 
        <span class="breadcrumbs"><a href="http://test.host/">Home</a> &gt; Shops</span>

  - should create a breadcrumb trail with specified delimiter

    crumbs = [{:name => 'Home', :link => 'http://test.host/'},
              {:name => 'Shops'}]
    breadcrumb_trail(crumbs. :div, '|').should => 
      <div class="breadcrumbs"><a href="http://test.host/">Home</a> | Shops</div>


Copyright (c) 2008 Relevance, Inc., released under the MIT license
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server