From e6feddc952ecb232ac0304ffa698ae707ac39cdb Mon Sep 17 00:00:00 2001 From: mitchell <70453897+orbitalquark@users.noreply.github.com> Date: Fri, 4 Sep 2020 22:50:04 -0400 Subject: Renamed doc/ to docs/ and removed bombay dependency. Added some documentation infrastructure for eventual migration to a new build service. Use a simple Lua script for generating documentation offline. --- scripts/gen_doc.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 scripts/gen_doc.lua (limited to 'scripts') diff --git a/scripts/gen_doc.lua b/scripts/gen_doc.lua new file mode 100755 index 00000000..1d317935 --- /dev/null +++ b/scripts/gen_doc.lua @@ -0,0 +1,11 @@ +#!/usr/bin/lua +-- Part of a pipeline that fills in simple {{ variable }} templates when +-- generating documentation offline. +-- cat file.md | markdown | gen_doc > file.html + +local html = io.read('*a') +local f = io.open('../docs/_layouts/default.html') +io.write( + f:read('*a'):gsub('{{ page.title }}', html:match('([^<]+)')): + gsub('{{ content }}', (html:gsub('%%', '%%%%')))) +f:close() -- cgit v1.2.3