forked from adamstac/nanoc-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rules
43 lines (37 loc) · 808 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
39
40
41
42
43
#!/usr/bin/env ruby
require 'compass'
Compass.add_project_configuration 'config/compass.config'
compile '/stylesheets/*/' do
case item[:extension]
when /sass$/, /scss$/: filter :sass, Compass.sass_engine_options
else nil
end
end
route '/stylesheets/*/' do
item.identifier.chop + '.css'
end
compile '/scripts/*/' do
nil
end
route '/scripts/*/' do
item.identifier.chop + '.' + item[:extension]
end
compile '/static/*/' do
nil
end
route '/static/*/' do
item.identifier.chop + '.' + item[:extension]
end
compile '*' do
case item[:extension]
when /haml$/: filter :haml
when /markdown$/, /md$/: filter :kramdown
when /erb$/: filter :erb
end
filter :colorize_syntax
layout 'default'
end
route '*' do
item.identifier + 'index.html'
end
layout '*', :haml, :format => :html5