wdoc
Declare pages and sites in WCL, project them from data, and render one model to HTML, Markdown, a skill folder, or PDF.
wdoc Overview
What wdoc is and the page → site → template → render-target model.
Pages & sites
The site block: one output target — template, title, theme, multi-site routing, and full-text search.
- A page holds content blocks and joins sites via sites
- A site picks a template, title, theme, and navigation
- Several sites per document; root = true owns /
Built-in site templates
- :webpage — header + sticky navbar from menu
- :book — mdBook-style sidebar from toc
- :presentation — this deck: a keyboard-driven 2-D grid
- :ai_skill — a Claude skill folder via wcl wdoc skill
Prose, tables & callouts
Inline patterns (bold / italic / code / links / icons / math), headings, code, lists, callouts.
- Inline patterns light up everywhere: bold, code, links, icons, math
- table { rows: | … | } — pipe rows, inline patterns in cells
- Six callout classes from note to error; column for side-by-side layout
diagram
- Shapes on a sized canvas, wired by a -> b edges
- Auto-layout: :layered, :radial, :force
- Flowcharts, sequence & state diagrams, trees, maps, tilemaps, terminals, wireframes
charts
- bar_chart / line_chart / pie_chart over { name, values } series
- timeline — a real calendar axis with items, phases, and event cards
Data Views
Render content from WCL data: wdoccomponent / slot / repeater / instance, body & project, partial & collect._
- wdoc_component + wdoc_slot — reusable markup with parameters
- wdoc_repeater stamps blocks, pages, and nav entries from lists
- body / project — content rides on data records, rendered by reference
Visibility & themes
The @only / @except decorators scope a block by site, template kind, or backend.
- @only / @except scope any block by site, template, or backend
- Six built-in themes (theme = :nord, …) with a light/dark toggle
Render targets
Get a finished HTML build of a wdoc document, and a watch-rebuild server while you iterate on it.
- wcl wdoc build → HTML · serve → live preview
- markdown → a .md per page · pdf → paginated A4
- skill → SKILL.md + references/ for agents
Review a site with comments
Run the click-to-comment review loop: a reviewer pins notes on the served site, and the notes are listed, worked through, and resolved from the CLI.
- wcl wdoc serve --comment — click any block to pin a note
- wcl wdoc comments lists and resolves; wcl wdoc review hands off to an agent
Where to go next
- The book — every block family with live demos
- The training course — twelve hands-on lessons
- The skill — the same reference, loaded by your agent