forked from kevinjalbert/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRules
60 lines (48 loc) · 973 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
57
58
59
60
#!/usr/bin/env ruby
# Compile and route the sitemap
compile 'sitemap' do
filter :erb
end
route 'sitemap' do
item.identifier.chop + '.xml'
end
# Don't compile the CSS file and route them
compile '/public/css/*' do
# don’t filter or layout
end
route '/public/css/*' do
item.identifier.chop + '.css'
end
# Don't compile the hosted files and route them
compile '/public/files/*' do
# don’t filter or layout
end
route '/public/files/*' do
item.identifier.chop + "." + item[:extension]
end
# Compile the project pages
compile '/projects/*' do
filter :erb
layout 'projects'
end
# Compile the publication pages
compile '/publications/*' do
filter :erb
layout 'publications'
end
# Compile the poster pages
compile '/posters/*' do
filter :erb
layout 'posters'
end
# Compile the rest of the pages
compile '*' do
filter :erb
layout 'default'
end
# Route all pages
route '*' do
item.identifier + 'index.html'
end
# Default
layout '*', :erb