1. Aug 25th, 2006

    Microformat helper for Ruby on Rails

    microformat-for-rails.png

    1. Start here, it’s a great introduction to microformats. Of head over to microformats.org.

    2. Install the microformats helper plugin:

    ./script/plugin install http://labnotes.org/svn/public/ruby/rails_plugins/microformat_helper

    3. Include the helper in your controller:

    helper :microformat

    4. 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 %>
          <p>Published on <%= post.created_on.microformat :published %> by
            <%= hcard :fn=>post.author, :url=>post.author_url, :class=>"author" %>
          </p><%
        end
      end
    end %>

    The plugin currently provides helper methods for hAtom, basic hCard, and the datetime design pattern.

    1. Aug 28th, 2006

      Labnotes » scrAPI 1.2.0: Explicit skip and hAtom

      [...] Out of that, I extracted a Microformats helper for Rails. And it was only reasonable I use one piece of code to produce the output, another piece of code to test it. So I wrote a simple hAtom scraper using scrAPI. It’s an early release that does hAtom and very basic hCard, but it’s worth checking out. It’s also an example of how to write scrapers, I incorporated a few tips and tricks in there. [...]

    2. Mar 5th, 2007

      MyCATS :: Blog Archive » The Artist Formerly Known as “Learning Object”

      [...] is to create a simple, microformat generator similar to the hcard generator by extending the Microformats Helper for Ruby on Rails. My Rails skills are getting pretty good but I might have to learn a bit more [...]

    3. Mar 16th, 2008

      MetaSpring | Michigan Web Design

      Thank you for providing a great plugin. I have not begun to use Micro formatting yet, but I can see the demand beginning to rise. I am very interested to see how all of these standards will interact and how they will be used. Have you used or heard about Google’s Open Social? http://code.google.com/apis/opensocial/

    Your comment, here ⇓