fix up rules file a bit

This commit is contained in:
Lorin Werthen 2016-07-19 10:27:27 +02:00
parent 40705033f2
commit 911978d4ba

23
Rules
View file

@ -2,37 +2,32 @@
# frozen_string_literal: true # frozen_string_literal: true
# ERB # ERB
compile '/**/*.erb' do compile '/*.erb' do
filter :erb layout '/default.*'
layout '/default.erb'
filter :relativize_paths, type: :html
end
# relativize_paths filter :erb
compile '/**/*.html' do
filter :relativize_paths, type: :html filter :relativize_paths, type: :html
end end
# Coffeescript # Coffeescript
compile '/**/*.coffee' do compile '/assets/scripts/**/*.coffee' do
filter :coffeescript filter :coffeescript
end end
# SCSS # SCSS
compile '/**/*.scss' do compile '/assets/stylesheets/**/*.scss' do
filter :sass, syntax: :scss filter :sass, syntax: :scss
end end
# Compile all posts # Compile all posts
compile '/posts/**/*.md' do compile '/posts/**/*.md' do
# Every post is an article, needed for blogging helper
@item.attributes[:kind] = 'article' @item.attributes[:kind] = 'article'
filter :kramdown filter :kramdown
layout '/eventpost.erb' layout '/eventpost.*'
filter :erb layout '/default.*'
layout '/default.erb'
filter :erb filter :erb
filter :relativize_paths, type: :html filter :relativize_paths, type: :html
@ -50,7 +45,7 @@ route '/assets/scripts/**/*' do
"#{item.identifier.without_ext}.js" "#{item.identifier.without_ext}.js"
end end
passthrough '/**/*.png' passthrough '/assets/images/*.{png}'
route '/**/*.{erb,html,md}' do route '/**/*.{erb,html,md}' do
"#{item.identifier.without_ext}/index.html" "#{item.identifier.without_ext}/index.html"