diff options
author | Connor Shea <connor.james.shea@gmail.com> | 2016-10-06 08:40:24 +0300 |
---|---|---|
committer | Connor Shea <connor.james.shea@gmail.com> | 2016-10-06 08:40:24 +0300 |
commit | 764ca757a5584314c2a5515140b523f52c9d6997 (patch) | |
tree | 585ba3f994ca8392b5ee4f2097eda06990e0728c /Rules |
Init repo.
Diffstat (limited to 'Rules')
-rw-r--r-- | Rules | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -0,0 +1,39 @@ +#!/usr/bin/env ruby + +compile '/**/*.html' do + layout '/default.*' +end + +# This is an example rule that matches Markdown (.md) files, and filters them +# using the :kramdown filter. It is commented out by default, because kramdown +# is not bundled with Nanoc or Ruby. +# +compile '/**/*.md' do + filter :kramdown + layout '/default.*' +end + +compile '/content/stylesheet.scss' do + filter :sass, syntax: :scss + write item.identifier.without_ext + '.css' +end + +route '/**/*.scss' do + item.identifier.without_ext + '.css' +end + +route '/**/*.{html,md}' do + if item.identifier =~ '/index.*' + '/index.html' + else + item.identifier.without_ext + '/index.html' + end +end + +compile '/**/*' do + unless item.identifier.ext == 'scss' + write item.identifier.to_s + end +end + +layout '/**/*', :erb |