-
Notifications
You must be signed in to change notification settings - Fork 148
/
Rules
38 lines (32 loc) · 772 Bytes
/
Rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env ruby
compile '/**/*.html' do
layout '/default.*'
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 :fenced_code_block
filter :kramdown, :toc_levels => [2]
filter :colorize_syntax,
:colorizers => {:javascript => :pygmentsrb}
layout '/default.*'
end
# compile '/**/*.css' do
# end
# compile '/**/*.js' do
# end
# compile '/**/*.png' do
# end
route '/**/*.{html,md}' do
if item.identifier =~ '/index.*'
'/index.html'
else
item.identifier.without_ext + '/index.html'
end
end
compile '/**/*' do
write item.identifier.to_s
end
layout '/**/*', :erb