(Work in progress.) A blog storage engine based on git.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.document
.gitignore
LICENSE
README.rdoc
Rakefile
VERSION.yml
blogitr.gemspec

README.rdoc

Blogitr

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:

  1. A static site generator.

  2. 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.

API stability

The APIs provided by this library will change without warning until version 0.2 is released.

Article format

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.

Repository layout

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:

YYYY/MM/DD/HHMM-PERMALINK.FORMAT

Note that the date is stored in the blog's timezone, not in GMT.

What's been implemented

  1. Document metadata (stored as YAML headers).

  2. Extended content (using the WordPress <!–more–> convention).

  3. Pluggable text filters, with out-of-the box support for Textile, Markdown and raw HTML.

  4. Pluggable macros for generating custom HTML. These work like <typo:code>.

  5. Loading a blog's metadata.

  6. Loading a blog's articles.

Copyright

Copyright 2009 Eric Kidd. See LICENSE for details.