-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathRules
More file actions
executable file
·48 lines (42 loc) · 795 Bytes
/
Rules
File metadata and controls
executable file
·48 lines (42 loc) · 795 Bytes
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
#!/usr/bin/env ruby
compress = File.exists? 'COMPRESS'
# Stylesheets
compile '/styles/*' do
filter :less
filter :rainpress if compress
end
route '/styles/*' do
item.identifier.without_ext + '.css'
end
# Publications
compile '/publications/*' do
end
route '/publications/*.pdf' do
item.identifier.to_s
end
route '/publications/*' do
item.identifier.without_ext + '.bib'
end
# Index
route '/index.*' do
'/index.html'
end
# All other files
compile '/**/*.md' do
filter :erb
filter :kramdown
layout '/default.*'
filter :externalize_links
filter :html5small if compress
end
compile '/**/*' do
write item.identifier.to_s
end
route '/**/*' do
if item.binary?
item.identifier.to_s
else
item.identifier.without_ext + '/index.html'
end
end
layout '/**/*', :erb