#!/usr/bin/env ruby compile '/**/*.html' do filter :erb layout '/blog.html' end compile '/**/*.rst' do filter :rst if item.identifier =~ /index.rst/ layout '/blog.html' elsif item.identifier =~ /[0-9]{4}-[0-1][0-9]-[0-9]{1,2}\.[0-9]+\.rst/ layout '/blog_article.html' else layout '/about.html' end end route '/**/*.{html,md,rst}' do if item.identifier =~ '/index.*' '/index.html' else item.identifier.without_ext + '.html' end end compile '/**/*' do write item.identifier.to_s end layout '/**/*', :erb