websitesrc.elv.sh/website/cmd/md2html

md2html command

Command md2html converts Markdown to HTML.

It is tailored for converting the Markdown sources of the Elvish website (https://elv.sh) to HTML.

It first applies a pre-processing step that expands the following macros:

The processed Markdown source is then converted to HTML using a codec based on md.HTMLCodec, with the following additional features:

The comment block for optional features should appear before the main text, and can contain multiple features (like <!-- toc number-sections -->).

A note on the implicit elvdoc target feature: ideally, we would like to use Markdown's shortcut link feature and let a simple [`put`] have an implicit target of builtin.html#put. Doing this has two prerequisites:

Hence we've settled on using an empty target for now. It is a bit ugly but hopefully not too ugly.

Version
v0.0.0-20250215174003-54ab2eec8167 (latest)
Published
Feb 15, 2025
Platform
linux/amd64
Imports
18 packages
Last checked
4 months ago

Tools for package owners.