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.
This commit is contained in:
2017-07-04 11:46:52 +01:00
parent 38f557c49b
commit 2e54b67e17

View File

@@ -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)