wdoc Reference
wdoc is WCL's documentation generator: you model content as WCL data and project it into a static site, a PDF, or a Claude Code skill. This book documents wdoc's blocks — sites, pages, formatting, data views, diagrams, charts and more. The site you are reading is built with it.
Looking for the WCL language, builtins or CLI?
Those now live in the wcl wskill — a self-contained reference projected into a book and a skill. See the WCL home page for the wskill list.
§ 1The mental model
A document is a tree of fields and blocks. A field binds a name to a value; a block is a named, labelled group of fields and nested blocks. wdoc adds a library of content blocks on top — here a tiny site with one page:
import <wdoc.wcl>
site docs { root = true default_template = :webpage title = "Docs" }
page index { sites = [:docs] start = true
h1 "Hello"
p "A page is blocks: headings, paragraphs, code, callouts, tables, diagrams."
}
The rest of this book walks the block set, one area per chapter.