public
Description: MetaOnRails: a Rails plugin that DRYs up your page meta tags.
Homepage: http://blog.ashchan.com/archive/2008/06/25/meta-on-rails-plugin-for-meta-tags/
Clone URL: git://github.com/ashchan/meta_on_rails.git
name age message
file .gitignore Wed Jun 25 00:24:47 -0700 2008 init commit [ashchan]
file MIT-LICENSE Wed Jun 25 02:10:35 -0700 2008 finished basic logic [#1 state:resolved] [ashchan]
file README Mon Jun 30 06:42:48 -0700 2008 updated README, added lighthouse link [ashchan]
file Rakefile Wed Jun 25 00:24:47 -0700 2008 init commit [ashchan]
file init.rb Wed Jun 25 02:10:35 -0700 2008 finished basic logic [#1 state:resolved] [ashchan]
file install.rb Wed Jun 25 00:24:47 -0700 2008 init commit [ashchan]
directory lib/ Wed Jun 25 02:10:35 -0700 2008 finished basic logic [#1 state:resolved] [ashchan]
directory tasks/ Wed Jun 25 00:24:47 -0700 2008 init commit [ashchan]
directory test/ Wed Jun 25 02:10:35 -0700 2008 finished basic logic [#1 state:resolved] [ashchan]
file uninstall.rb Wed Jun 25 00:24:47 -0700 2008 init commit [ashchan]
README
MetaOnRails
===========

MetaOnRails DRYs up your page meta tags.

It is a very simple plugin to help you customize your pages' meta tags a little bit easier.

How to Install
======
For Rails 2.1 or later:

  ./script/plugin install git://github.com/ashchan/meta_on_rails.git

Otherwise:

  git clone git://github.com/ashchan/meta_on_rails.git vendor/plugins/meta_on_rails

Example
=======
Add the following code to the layout (e.g. app/views/layout/application.html.erb), be sure to put it in the head tag:

  <head>
  <%= display_meta(:keywords => "default,keywords", :description => "default description") %>
  </head>

Default meta values can be set. In the above example, these two meta tags will be generated if they're not overridden on 
the views:

  <meta name="description" content="default description" />
  <meta name="keywords" content="default,keywords" />

Then add this code to the view to set meta tags on that page:

  <% set_meta(:keywords => 'my,keyword', :generator => 'a bad <script /> generator') %>

The output html will be like this:

  <meta name="generator" content="a bad  generator" />
  <meta name="description" content="default description" />
  <meta name="keywords" content="my,keyword" />

Bugs Tracking
=======

  http://ashchan.lighthouseapp.com/projects/13347-meta-on-rails/overview

=======

Copyright (c) 2008 James Chan (ashchan), released under the MIT license