10. Render targets
One model, four outputs: HTML, Markdown, a skill folder, and PDF.
After this lesson you can
- Render the same document to HTML, Markdown, and PDF - Project an :ai_skill site into a skill folder - Pick a single site out of a multi-site document with --site
Before you start: A book site and its table of contents
The render targets all consume the same document: wcl wdoc build writes HTML, markdown writes one .md per page (diagrams become static .svg files it references), and pdf writes a paginated, pure-Rust PDF per site. When a document declares several sites, --site <name> renders just one.
The fourth target is the skill folder: a site with default_template = :ai_skill and a skill { } block (its name and description become SKILL.md front matter) renders through wcl wdoc skill — the start page becomes SKILL.md and every other page lands under references/. Running build on a skill site is an error that points you at the right command.
§ 1Exercise: Render everything
Render your book to HTML, Markdown, and PDF, then add a minimal :ai_skill site and render the skill folder.
# after adding: site helper { default_template = :ai_skill
# skill { name = "docs-helper" description = "When to use this skill." } }
Expected result
out/html holds the site, out/md one .md per page with .svg diagram assets, out/pdf a paginated PDF, and out/skill/SKILL.md carries the name/description front matter.
Hint
The skill site needs a page marked start = true — that page becomes SKILL.md itself.