sloane.sh/Rules
2025-01-03 17:17:18 -05:00

33 lines
719 B
Ruby

#!/usr/bin/env ruby
compile '/**/*.html' do
filter :tufte
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 :sidenotes
filter :kramdown
filter :tufte
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