Skip to content


Subversion checkout URL

You can clone with
Download ZIP
the 10 second blog-engine for hackers

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


the tiniest blogging engine in Oz!


toto is a git-powered, minimalist blog engine for the hackers of Oz. The engine weights around ~200 sloc at its worse. There is no toto client, at least for now; everything goes through git.


Everything that can be done better with another tool should be, but one should not have too much pie to stay fit.

how it works

  • content is entirely managed trough git; you get full fledged version control for free.
  • articles are stored as .txt files, with embeded metadata (in yaml format).
  • templating is done through ERB.
  • toto is built right on top of Rack.
  • comments are handled by disqus:(
  • individual articles can be accessed through urls such as /2009/11/21/blogging-with-toto
  • the archives can be accessed by year, month or day, wih the same format as above.


One would start by forking or cloning the toto-skeleton repo, to get a basic skeleton:

$ git clone git://

One would then edit the template at will, it has the following structure:

+- layout.rhtml      # the main site layout, shared by all pages
+- feed.builder      # the builder template for the atom feed
+- pages/            # pages, such as home, about, etc go here
   +- index.rhtml    # the default page loaded from `/`, it displays the list of articles
   +- article.rhtml  # the article (post) partial and page
   +- about.rhtml

One could then create a .txt article file in the articles/ folder, and make sure it has the following format:

title: The Wonderful Wizard of Oz
author: Lyman Frank Baum
date: 1900/05/17

Dorothy lived in the midst of the great Kansas prairies, with Uncle Henry, 
who was a farmer, and Aunt Em, who was the farmer's wife.

If one is familiar with webby or aerial, this shouldn't look funny. Basically the top of the file is in YAML format, and the rest of it is the blog post. They are delimited by an empty line /\n\n/, as you can see above. None of the information is compulsory, but it's strongly encouraged you specify it. Note that one can also use rake to create an article stub, with rake new.

Once he finishes writing his beautiful tale, one can push to the git repo, as usual:

$ git add articles/wizard-of-oz.txt
$ git commit -m 'wrote the wizard of oz.'
$ git push remote master

Where remote is the name of your remote git repository. The article is now published.


Toto is built on top of Rack, and hence has a rackup file:

on your own

You can run toto with any Rack compliant web server, such as thin, mongrel or unicorn.

With thin, you would do something like:

$ thin start -R

With unicorn, you can just do:

$ unicorn

on heroku

Toto was designed to work well with heroku:(, it makes the most out of it's state-of-the-art caching, by setting the Cache-Control and Etag HTTP headers.


You can configure toto, by modifying the file. For example, if you want to set the blog author to 'John Galt', you could add set :author, 'John Galt' inside the block. Here's the options hash with the defaults:

:author   => ENV['USER'],                               # blog author 
:title    => Dir.pwd.split('/').last,                   # site title
:root     => "index",                                   # page to load on / 
:date     => lambda {|now| now.strftime("%d/%m/%Y") },  # date format for articles 
:markdown => :smart,                                    # use markdown + smart-mode 
:disqus   => false,                                     # disqus id, or false 
:summary  => 150,                                       # length of article summary 
:ext      => 'txt'                                      # file extension for articles 

Copyright (c) 2009 cloudhead. See LICENSE for details.

Something went wrong with that request. Please try again.