-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathRules
51 lines (41 loc) · 926 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
44
45
46
47
48
49
50
51
#!/usr/bin/env ruby
compile '/assets/less/*' do
# Note: built-in less filter not working properly
# using commandline filter instead
filter :bootstrap if @item.identifier.gsub('/assets/less/','').chop == 'bootstrap'
end
compile '/assets/css/*' do
filter :rainpress
end
compile '/assets/js/*/' do
# minify JS :)
if $use_minified_js then
filter :shellcmd, "java -jar js/js-compiler.jar"
end
end
compile '/assets/*/' do
# don't compile
end
route '/assets/css/*/' do
@item.identifier.chop + '.' + @item[:extension]
end
route '/assets/js/*/' do
@item.identifier.chop + '.' + @item[:extension]
end
route '/assets/less/*/' do
# don't copy over
end
compile '*' do
if not item.binary?
filter :erb
layout 'default'
end
end
route '*' do
if item.binary?
item.identifier.chop + '.' + item[:extension]
else
@item.identifier + 'index.html'
end
end
layout '*', :erb