#!/usr/bin/env ruby # frozen_string_literal: true # ERB compile '/*.erb' do layout '/default.*' filter :erb filter :relativize_paths, type: :html end # Coffeescript compile '/assets/scripts/**/*.coffee' do filter :coffeescript end # SCSS compile '/assets/stylesheets/**/*.scss' do filter :sass, syntax: :scss end # Compile all posts compile '/posts/**/*.md' do # Every post is an article, needed for blogging helper @item.attributes[:kind] = 'article' filter :kramdown layout '/eventpost.*' layout '/default.*' 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 '/assets/images/*.{png}' route '/**/*.{erb,html,md}' do "#{item.identifier.without_ext}/index.html" end layout '/**/*', :erb