Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Ruby minimalistic blog engine ... WATTT!!?!??
Failed to load latest commit information.
lib Support for some common markdown extensions.
spec Move away from old rspec syntax.
.gitignore Baseline implementation.
.ruby-version .ruby-version
.rvmrc Nobody uses rvm these days.
.travis.yml Travis configuration.
Gemfile Baseline implementation.
LICENSE.txt Baseline implementation. Updates file extensino in readme.
VERSION Version bump to 0.2.2
rollin.gemspec Allows redefinition of title with metatag.


A Ruby minimalistic filesystem based blog engine made for developers.

Different from other blog engines, rollin only does what matters, and leave the rest to you.

It currently supports Markdown format and uses the Github's awesome redcarpet.


Add the dependency to your Gemfile:

gem 'rollin'


Filesystem structure

First you will need to have the following structure in your filesystem.

├── posts


blog ={articles_folder: "posts"}) # Defaults to "articles"

article = blog.articles.first        # => "2013_05_01_My_first_post"
article.title     # => "My first post"
article.body      # => "<h3>My first post!</h3>\n<p>blah blah blah</p>"      # => #<Date: 2013-05-01 ((2456414j,0s,0n),+0s,2299161j)>
article.year      # => 2013
article.month     # => 05       # => 01


You may define articles metatags at the beginning of your article with the format:

author: Zé
title: My new awesome blog!
tags: development, fun

This is how you access the tag information.

article.metatags  # => { 'title' => 'My new awesome blog!',
                         'author' => 'Zé',
                         'tags' => [ 'development', 'fun' ] }

It is YAML snippet and follows a similar format to Jekyll's yaml front matter. Except that our special variables are different:

Metatag Description
title The article title. It overrides the extracted title from the file name.
published If the article is published. Defaults to "yes". Set it to "no" or "false" to hide an article.

Inquiring metatags

blog.metatags  # => A list of metatag objects

author_metatag = blog.metatags.first

author_metatag.label           # => "tags"
author_metatag.values          # => A list of metatag value objects

author_metatag_value = metatag.values.fist
author_metatag_value.content   # => "Zé"
author_metatag_value.articles  # => A list of articles containing that metatag value

Finding a articles

By article id

blog.article('2013_05_01_My_first_post')  # => #Rollin::Article(:title => "My first post" ...)

By metatag

blog.articles(:tags => "development")  # => A list of articles tagged with development

By date

blog.articles(:year => 2013)                          # => A list of articles for that year
blog.articles(:year => 2013, :month => 5)             # => A list of articles for that month
blog.articles(:year => 2013, :month => 5, :day => 1)  # => A list of articles for that day



may_archive = blog.monthly_archive.first

may_archive.year      # => 2013
may_archive.month     # => 5
may_archive.articles  # => [ Rollin::Article(:title => "My first post" ...) ]


twenty_thirteen_archive = blog.annual_archive.first

twenty_thirteen_archive.year                 # => 2013
twenty_thirteen_archive.articles             # => [ Rollin::Article(:title => "My first post" ...) ]
twenty_thirteen_archive.monthly_archive      # => [ Rollin::MonthArchive(:year => 2013, :month => 5 ...) ]

More datailed documentation

You can find a more detailed documentation at the rollin_spec.rb file.


Since it is meant to be used in a blogging domain it is not optimized with caching. You should implement cache in the infrastructure layer, what shouldn't be hard in a mostly static environment.

Build status

Build Status


  1. Pull request!
Something went wrong with that request. Please try again.