From 2e54b67e179aa1cad6ab2bd4fee7d771ac614cca Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Tue, 4 Jul 2017 11:46:52 +0100 Subject: [PATCH] Build site locally into docs directory GitHub Pages just doesn't want to render the markdown with Kramdown the way we need. So instead of using GitHub Pages' jekyll rendering, we'll simply render the site offset to static HTML in the docs directory and inform GitHub Pages to use that. --- Rakefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Rakefile b/Rakefile index faa7bdc..7e16181 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,11 @@ require 'open-uri' require 'yaml' +desc 'Build site into docs directory' +task :build do + jekyll_build +end + desc 'Update index.md and spec folder based on versions in _config.yml' task :update do config = YAML.load_file('_config.yml') @@ -22,6 +27,13 @@ task :update do write_file("#{filename}.md", spec[:body]) write_file("#{filename}.svg", spec[:diagram]) if spec[:diagram] end + + jekyll_build +end + +def jekyll_build + puts 'Rebuilding output into docs directory...' + exec 'jekyll build --destination docs && touch docs/.nojekyll' end def write_file(file, content, comment = nil)