forked from rvm/rvm-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRules
63 lines (50 loc) · 1.13 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env ruby
require "compass"
Compass.add_project_configuration('compass_config.rb')
# For compass v0.10 should be:
# Compass.add_configuration "#{File.dirname(__FILE__)}/compass_config.rb"
compile "/assets/css/*/" do
filter :sass, Compass.sass_engine_options
end
route "/assets/css/_*/" do
nil # don't output partials, so return nil
end
route '/assets/css/*' do
item.identifier.chop.sub(%r{^/assets}, '') + ".css"
end
%w(assets/images assets/javascripts).each do |asset_dir|
compile "/#{asset_dir}/*" do
nil
end
route "/#{asset_dir}/*" do
item.identifier.chop.sub(%r{^/assets}, '') + "." + item[:extension]
end
end
{
"/robots" => "/robots.txt",
"/assets/favicon" => "/favicon.ico",
"/google0e4a57f3096204a2" => "/google0e4a57f3096204a2.html",
}.each do |file, url|
compile file do
nil
end
route file do
url
end
end
compile '*' do
case
item[:extension]
when 'md'
filter :rdiscount
filter :auto_ids
filter :pre_code
when 'haml'
filter :haml
end
layout "default"
end
route '*' do
item.identifier + "index.html"
end
layout '*', :haml