Blogitr is an experimental blog storage engine based on git. So far, this is just a rough sketch of an idea–nothing here is actually usable yet. Blogitr is intended to replace the app/models subdirectory of a typical blogging application.
What Blogitr isn't intended to be:
A static site generator.
A dynamic site application.
Blogitr is inspired by Jekyll and Typo. It should be relatively easy to export blog posts from Typo or Mephisto for use with Blogitr, because the underlying conceptual models are very similar.
The APIs provided by this library will change without warning until version 0.2 is released.
An example Blogitr article:
title: Metaprogramming tips Ruby supports class-based metaprogramming, which offers many of the advantages of LISP macros. <!--more--> The Sinatra web framework, for example, uses top-level functions such as @get@ to declare how to respond to HTTP requests: <macro:code lang="ruby"> get "/" do "Welcome to my website!" end </macro>
Note that the code macro is not currently supplied by Blogitr. It could, however, be implemented by subclassing Blogitr::Macro.
Here's an example repository:
blog.yml 2009/04/18/1312-metaprogramming-tips.markdown 2009/04/19/0947-my-most-recent-post.textile
The top-level blog.yml file contains information about the blog. Individual blog posts are stored in files with names of the form:
Note that the date is stored in the blog's timezone, not in GMT.
What's been implemented
Document metadata (stored as YAML headers).
Extended content (using the WordPress <!–more–> convention).
Pluggable text filters, with out-of-the box support for Textile, Markdown and raw HTML.
Pluggable macros for generating custom HTML. These work like <typo:code>.
Loading a blog's metadata.
Loading a blog's articles.
Copyright 2009 Eric Kidd. See LICENSE for details.