Rules 556 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env ruby
  2. compile '/**/*.html' do
  3. layout '/default.*'
  4. end
  5. # This is an example rule that matches Markdown (.md) files, and filters them
  6. # using the :kramdown filter. It is commented out by default, because kramdown
  7. # is not bundled with Nanoc or Ruby.
  8. #
  9. compile '/**/*.md' do
  10. filter :kramdown
  11. layout '/default.*'
  12. end
  13. route '/**/*.{html,md}' do
  14. if item.identifier =~ '/index.*'
  15. '/index.html'
  16. else
  17. item.identifier.without_ext + '/index.html'
  18. end
  19. end
  20. compile '/**/*' do
  21. write item.identifier.to_s
  22. end
  23. layout '/**/*', :erb