-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRules
56 lines (43 loc) · 897 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
52
53
54
55
56
#!/usr/bin/env ruby
# encoding: utf-8
# Compass
require 'compass'
Compass.add_project_configuration 'config/compass.rb'
# Compile
compile '/images/*/' do
end
compile '/videos/*/' do
end
compile '/stylesheets/*/' do
filter :sass, Compass.sass_engine_options
end
compile '/javascripts/*/' do
end
compile '*' do
filter :erb
layout 'default'
end
# Route
route '/images/*/' do
item.identifier.chop + '.' + item[:extension]
end
route '/videos/*/' do
item.identifier.chop + '.' + item[:extension]
end
route '/stylesheets/_*/' do
end
route '/stylesheets/*/' do
item.identifier.chop + '.css'
end
route '/javascripts/*/' do
item.identifier.chop + '.' + item[:extension]
end
route '*' do
if item.children.size > 0 || item.identifier == '/'
item.identifier + 'index.html'
else
item.identifier.gsub(/\/$/, '') + '.' + item[:extension]
end
end
# Layout
layout '*', :erb