#!/usr/bin/env ruby
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
filter :colorize_syntax, default_colorizer: :rouge
layout '/default.*'
if item.identifier =~ '**/index.*'
write item.identifier.without_ext + ".html"
else
write item.identifier.without_ext + '/index.html'
end
end
compile '/**/*' do
write item.identifier.to_s
end
layout '/**/*', :erb