#!/usr/bin/env ruby compile("/layouts/*") { write(nil) } compile '/**/*.html' do layout '/default.*' if item.identifier =~ '**/index.*' write item.identifier.to_s else write item.identifier.without_ext + '/index.html' end end # This is an example rule that matches Markdown (.md) files, and filters them # using the :kramdown filter. It is commented out by default, because kramdown # is not bundled with Nanoc or Ruby. # #compile '/**/*.md' do # filter :kramdown # layout '/default.*' # # if item.identifier =~ '**/index.*' # write item.identifier.without_ext + '.html' # else # write item.identifier.without_ext + '/index.html' # end #end passthrough "/**/*" layout '/**/*', :erb