diff options
| author | Paul Iannetta <paul.iannetta@inria.fr> | 2019-06-10 09:04:12 +0200 |
|---|---|---|
| committer | Paul Iannetta <paul.iannetta@inria.fr> | 2019-06-10 09:04:12 +0200 |
| commit | 7c8d5e9040490162d8048eddb25f95bdef2f4c90 (patch) | |
| tree | f29db36e404b84bdde9a75aee3fc583c1a337946 /Rules | |
Diffstat (limited to 'Rules')
| -rw-r--r-- | Rules | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -0,0 +1,31 @@ +#!/usr/bin/env ruby + +compile '/**/*.html' do + filter :erb + layout '/blog.html' +end + +compile '/**/*.rst' do + filter :rst + if item.identifier =~ /index.rst/ + layout '/blog.html' + elsif item.identifier =~ /[0-9]{4}-[0-1][0-9]-[0-9]{1,2}\.[0-9]+\.rst/ + layout '/blog_article.html' + else + layout '/about.html' + end +end + +route '/**/*.{html,md,rst}' do + if item.identifier =~ '/index.*' + '/index.html' + else + item.identifier.without_ext + '.html' + end +end + +compile '/**/*' do + write item.identifier.to_s +end + +layout '/**/*', :erb |
