Links
Microformat helper
Categories
Microformat helper
The plugin currently provides helper methods for hAtom, basic hCard, and the datetime design pattern.
Start here, it’s a great introduction to microformats. Or head over to microformats.org.
Install the microformats helper plugin:
./script/plugin install http://labnotes.org/svn/public/ruby/railsplugins/microformathelper
Include the helper in your controller:
helper :microformat
Try it out with an hAtom feed:
<% render_hfeed do posts.each do |post| render_hentry "post-#{post.id}" do %> <%= hentry_title post.title %> <%= hentry_content post.content %> Published on <%= post.created_on.microformat :published %> by <%= hcard :fn=>post.author, :url=>post.author_url, :class=>"author" %><% end end end %>
Vitals
| Home | http://blog.labnotes.org/2006/08/25/microformats-helper-for-ruby-on-rails/ |
|---|---|
| Repository | http://labnotes.org/svn/public/ruby/rails_plugins/microformat_helper |
| License | Rails' (MIT) |
| Rating | (3 votes) |
| Owner | Assaf Arkin |
| Created | 1 September 2006 |
