Summary
Replace the external markdown executable (discount 3.0.0d) with the cmark Lua module to reduce external dependencies.
Current Implementation
The codebase currently uses a build-time approach:
-
Build rule (static/md/Tupfile):
: foreach *.md |> markdown < %f > %o |> %B.html
-
Markdown files in static/md/:
home.md
about.md
changes.md
intro.md
security_incident_march_2019.md
-
Views include pre-compiled HTML via raw_ssi helper in widgets/helpers.moon
Plan
Files to Modify
luarocks-site-dev-1.rockspec - Add cmark dependency
cmd/render_markdown.moon - New script to render markdown using cmark module
static/md/Tupfile - Update build rule to use new script
Benefits
- Removes dependency on external
markdown executable
- Uses a Lua module that can be managed via LuaRocks
cmark is the reference implementation for CommonMark, well-maintained by jgm
Tasks
Summary
Replace the external
markdownexecutable (discount 3.0.0d) with thecmarkLua module to reduce external dependencies.Current Implementation
The codebase currently uses a build-time approach:
Build rule (
static/md/Tupfile):Markdown files in
static/md/:home.mdabout.mdchanges.mdintro.mdsecurity_incident_march_2019.mdViews include pre-compiled HTML via
raw_ssihelper inwidgets/helpers.moonPlan
Files to Modify
luarocks-site-dev-1.rockspec- Add cmark dependencycmd/render_markdown.moon- New script to render markdown using cmark modulestatic/md/Tupfile- Update build rule to use new scriptBenefits
markdownexecutablecmarkis the reference implementation for CommonMark, well-maintained by jgmTasks
cmarkto dependencies in rockspeccmd/render_markdown.moonscript using cmark modulestatic/md/Tupfileto use new script