-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rules
50 lines (41 loc) · 923 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
#!/usr/bin/env ruby
require 'compass'
Compass.add_project_configuration('config.rb')
compile '/style/*' do
filter :sass, Compass.sass_engine_options
end
compile '/stylesheets/partials/*/' do
# don’t compile partials
end
compile '/' do
filter :redcarpet
layout 'default'
end
compile '*' do
next if item.binary? # don’t filter binary items
case item[:extension]
when 'md'
filter :redcarpet
when 'erb'
filter :erb
end
layout 'default'
end
route '/style/_*/' do
# don't output partials, so return nil
nil
end
route '/style/*/' do
# don't generate a directory like we do for HTML files
item.identifier.chop + '.css'
end
route '*' do
if item.binary?
# Write item with identifier /foo/ to /foo.ext
item.identifier.chop + '.' + item[:extension]
else
# Write item with identifier /foo/ to /foo/index.html
item.identifier + 'index.html'
end
end
layout '*', :erb