-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRules
46 lines (38 loc) · 1.06 KB
/
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
39
40
41
42
43
44
45
46
#!/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
# layout '/default.*'
#
# if item.identifier =~ '**/index.*'
# write item.identifier.without_ext + '.html'
# else
# write item.identifier.without_ext + '/index.html'
# end
# end
compile "/**/*.haml" do
filter :haml
layout "/default.*"
write item.identifier.without_ext + ".html"
end
require "nanoc/dart_sass"
compile "/**/stylesheets/*.scss" do
next if /^_/.match?(item.identifier.to_s.split("/").last) # pass partials nested in folders
filter :dart_sass, syntax: :scss
filter :rainpress
write item.identifier.without_ext
end
passthrough "/**/*"
layout "/**/*", :haml, format: :html5