JADOF - Just A Directory Of Files

To view this screencast, add it to your cart and checkout. You can buy this screencast for any price, including FREE!

In Test-Driving Your Own Hacker Blogging Engine, I mentioned JADOF, the CMS that I run remi.org off of.

JADOF is very simple. It’s very like Jekyll, but it makes less assumptions. It doesn’t even know anything about web servers! It’s just a library for loading pages / posts out of directories, hence the name:

JADOF is ”Just A Directory Of Files”

If you make a pages directory and start putting markdown (or whatever) files into it, this is a very simple Sinatra application that you could make to serve up your files:

 1 %w( sinatra jadof ).each {|lib| require lib }
 2 
 3 get '/' do
 4   @pages = JADOF::Page.all
 5   haml :index
 6 end
 7 
 8 get '/*' do
 9   JADOF::Page.get(params[:splat]).to_html
10 end
11 
12 __END__
13 
14 @@ index
15 %h1 Pages
16 %ul
17   - for page in @pages
18     %li
19       %a{ :href => "/#{ page.to_param }" }= page.name

In this screencast, we look at: