56 lines
840 B
Ruby
56 lines
840 B
Ruby
#!/usr/bin/env ruby
|
|
|
|
# ERB
|
|
compile '/**/*.erb' do
|
|
filter :erb
|
|
layout '/default.erb'
|
|
end
|
|
|
|
# relativize_paths
|
|
compile '/**/*.{erb,html}' do
|
|
filter :relativize_paths, type: :html
|
|
end
|
|
|
|
# Coffeescript
|
|
compile '/**/*.coffee' do
|
|
filter :coffeescript
|
|
end
|
|
|
|
# SCSS
|
|
compile '/**/*.scss' do
|
|
filter :sass, syntax: :scss
|
|
end
|
|
|
|
# Compile all posts
|
|
compile '/posts/**/*.md' do
|
|
filter :kramdown
|
|
|
|
layout '/eventpost.erb'
|
|
filter :erb
|
|
|
|
layout '/default.erb'
|
|
filter :erb
|
|
|
|
filter :relativize_paths, type: :html
|
|
end
|
|
|
|
route '/index.*' do
|
|
'/index.html'
|
|
end
|
|
|
|
route '/assets/stylesheets/**/*' do
|
|
"#{item.identifier.without_ext}.css"
|
|
end
|
|
|
|
route '/assets/scripts/**/*' do
|
|
"#{item.identifier.without_ext}.js"
|
|
end
|
|
|
|
passthrough '/**/*.png'
|
|
|
|
route '/**/*.{erb,html,md}' do
|
|
"#{item.identifier.without_ext}/index.html"
|
|
end
|
|
|
|
|
|
layout '/**/*', :erb
|