yf-markdown-html

Render a Markdown file to a single, self-contained HTML file via pandoc — standalone document, all resources embedded (i

Render a Markdown file to a single, self-contained HTML file via pandoc — standalone document, all resources embedded (images, CSS, fonts), a broad-coverage default stylesheet, relative image paths (`![](diagrams/x.png)`) resolved against the source file's directory, self-contained math (MathML, no CDN), and opt-in CriticMarkup rendering.

At a glance

  • Category: markdown
  • Invocation: auto (fires from its description conditions when relevant work appears)
  • Requires tools: uv, pandoc
  • Source: SKILL.md · README.md

When it fires

/yf-markdown-html invoked; the user wants an HTML file created/generated from a `.md` file; "export this report to HTML", "make a self-contained web page from this note".

When to skip it

PDF output (use `yf-markdown-pdf`); slide decks; linting markdown (use `yf-markdown-lint`); reformatting markdown (use `yf-markdown-format`).


Prerequisites

Tool Version Purpose Install
uv any Runs the wrapper script (PEP 723) https://docs.astral.sh/uv/
pandoc any Markdown → HTML converter https://pandoc.org/installing.html

Mirrors SKILL.md frontmatter depends-on-tool: [uv, pandoc]. The script checks for pandoc and exits with a clear message if it is missing. No xelatex needed (that is yf-markdown-pdf). No init step, no config, no companion rule.

Usage

User-invocable. Render one or more Markdown files to self-contained HTML:

uv run .claude/skills/yf-markdown-html/scripts/md2html.py <input.md> [-o OUT.html]
# batch
uv run .claude/skills/yf-markdown-html/scripts/md2html.py a.md b.md
# render CriticMarkup; add a stylesheet; pass extra pandoc flags after `--`
uv run .claude/skills/yf-markdown-html/scripts/md2html.py r.md --criticmarkup --css house.css -- --toc

Output defaults to <input>.html beside the source. Pipeline defaults, the default stylesheet, self-contained math, and the opt-in CriticMarkup contract are documented in SKILL.md.

Self-contained. pandoc --standalone --to=html5 --embed-resources inlines every resource — images become data: URIs, the stylesheet embeds in a <style> block, and math renders as MathML (no CDN) — so the output opens offline with no external host. CriticMarkup (opt-in via --criticmarkup) renders the five constructs to styled <ins>/<del>/<mark>/<span>; note the tradeoff that it disables real GFM ~~strikethrough~~ while on. See SKILL.md.

Phase model

None. This is a tool/reference skill with no phases or state transitions.