Skip to content

Commit 30cb2d1

Browse files
author
Rebecca Murphey
committed
comments from last night's late-night fixes
1 parent 10dec73 commit 30cb2d1

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

Rules

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,37 @@
99
# “content/about.html”). To select all children, grandchildren, … of an
1010
# item, use the pattern “/about/*/”; “/about/*” will also select the parent,
1111
# because “*” matches zero or more characters.
12+
#
13+
# routes define what file should be served for a certain request
14+
#
15+
# compiles define how the content for a given route should be prepared
1216

1317
route '/assets/*/' do
18+
# when the request is for /assets/*
19+
# (e.g. '/assets/css/style.css') ...
20+
# this is the file to return, so we
21+
# return the item's identifier (e.g. '/assets/css/style/')
22+
# but chop off its last character ('/assets/css/style')
23+
# and then append the item's extension ('css')
1424
item.identifier.chop + '.' + item[:extension]
1525
end
1626

17-
# compile is what to do with the source files
1827
compile '/assets/*/' do
28+
# for assets, we don't want to do anything
1929
nil
2030
end
2131

32+
# these rules only apply if none of the rules above apply
33+
2234
compile '*' do
35+
# for most things, we want to run them through kramdown
2336
filter :kramdown
2437
layout 'default'
2538
end
2639

2740
route '*' do
41+
# for most things, we want to return the index.html
42+
# that corresponds with the identifier
2843
item.identifier + 'index.html'
2944
end
3045

0 commit comments

Comments
 (0)