File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 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
1317route '/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 ]
1525end
1626
17- # compile is what to do with the source files
1827compile '/assets/*/' do
28+ # for assets, we don't want to do anything
1929 nil
2030end
2131
32+ # these rules only apply if none of the rules above apply
33+
2234compile '*' do
35+ # for most things, we want to run them through kramdown
2336 filter :kramdown
2437 layout 'default'
2538end
2639
2740route '*' do
41+ # for most things, we want to return the index.html
42+ # that corresponds with the identifier
2843 item . identifier + 'index.html'
2944end
3045
You can’t perform that action at this time.
0 commit comments