Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 28b839a891
Fetching contributors…

Cannot retrieve contributors at this time

83 lines (67 sloc) 1.48 kB
#!/usr/bin/env ruby
preprocess do
create_robots_txt
create_webmaster_tools_authentications
create_sitemap
end
compile '/assets/css/*' do
filter :cache_buster
filter :rainpress
end
route %r{^/(assets/.*|sitemap|robots|atom)/$} do
next nil if item.identifier.split('/')[-1][0,1] == '_' # partial
fp = cachebust?(item) ? fingerprint(item[:filename]) : ''
item.identifier.chop + fp + '.' + item[:extension]
end
compile '/sitemap/' do
filter :erb
end
compile '/blog/feed/' do
filter :erb
end
route '/blog/feed/' do
'/blog.xml'
end
compile %r{^/(google|robots|assets|favicon)} do
end
compile '*' do
case item[:extension]
when 'slim'
filter :slim
when 'md'
filter :redcarpet, renderer: MarkdownHTML, options: {
fenced_code_blocks: true,
no_intra_emphasis: true,
autolink: true,
tables: true,
strikethrough: true,
lax_html_blocks: true,
space_after_headers: true,
superscript: true
}
end
case item.identifier
when %r{/_}
layout 'none'
when %r{^/blog/.+}
layout 'post'
when %r{^/docs/}
layout 'doc'
else
layout 'default'
end
filter :cache_buster
end
route '/' do
'/index.html'
end
route '*' do
next nil if item.identifier.split('/')[-1][0,1] == '_' # partial
if item.binary?
# Write item with identifier /foo/ to /foo.ext
item.identifier.chop + '.' + item[:extension]
else
item.identifier.chop + '.html'
end
end
layout '*', :slim
Jump to Line
Something went wrong with that request. Please try again.