Repository navigation
Expand file tree
/
Copy pathRules
More file actions
80 lines (63 loc) · 1.44 KB
/
Copy pathRules
File metadata and controls
80 lines (63 loc) · 1.44 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/env ruby
require 'compass'
Compass.add_project_configuration 'compass.rb'
preprocess do
puts "Creating category pages..."
create_category_pages
create_categories_pages
puts "done."
end
compile '/assets/stylesheets/*' do
filter :sass, Compass.sass_engine_options.merge(:syntax => item[:extension].to_sym)
end
compile '/articles/*.haml' do
filter :haml
filter :erb
layout '/article.*'
layout '/default.*'
end
compile '/categories/*.html' do
filter :erb
layout '/category.*'
layout '/default.*'
end
compile '/**/*.html' do
filter :erb
layout '/default.*'
end
compile '/**/*.haml' do
filter :haml
filter :erb
layout '/default.*'
end
# This is an example rule that matches Markdown (.md) files, and filters them
# using the :kramdown filter. It is commented out by default, because kramdown
# is not bundled with Nanoc or Ruby.
#
#compile '/**/*.md' do
# filter :kramdown
# layout '/default.*'
#end
compile '/**/*' do
end
route '/assets/images/*' do
#ignore images for now
end
route '/assets/javascripts/*' do
#ignore javascripts for now
end
route '/assets/stylesheets/*' do
# flatten assets to assets/ similar to rails
'/assets/' + File.basename(item.identifier) + '.css'
end
route '/**/*.{haml,html,md}' do
if item.identifier =~ '/index.*'
'/index.html'
else
item.identifier.without_ext + '/index.html'
end
end
route '/**/*' do
item.identifier.to_s
end
layout '/**/*', :haml, :format => :html5