SEO Helper plugin
Plugin details
Documentation
ruby script/plugin install git://github.com/relevance/seo_helper.git
Examples
========
page_title
- should create a title with h1
page_title('Hello World') => Hello World
- should create a title with an alternate tag
page_title('Hello World', :h3) => Hello World
- 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') => SiteName
- should create an html title with content for html page title
index.html.erb
page_title('My Index')
application.html.erb
html_title('SiteName') => My Index : SiteName
- should create an html title specified delimiter
index.html.erb
page_title('My Index')
application.html.erb
html_title('SiteName', '|') => My Index | SiteName
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> > 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> > 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>
Further Documentation
There is currently no advanced documentation for this plugin.
New documentationEdit plugin | Back in time (2 older versions) | Last edited by: scott, 4 months ago

