Sites

The site block: one output target — template, title, theme, multi-site routing, and full-text search.

A site block configures one output site — its template, title, theme, and navigation. A document can declare several sites; each page joins one or more via its sites field.

wcl
site marketing {
  default_template = :webpage
  title            = "My project"
  root             = true
  theme            = :nord
  theme_toggle     = true
}

Set search = true on a site to add client-side full-text search. The build writes a per-page text index to _wdoc/search-index.json and the book and webpage templates render a search box — in the sidebar and the nav respectively.

Served, not opened

The widget fetches the index over HTTP, so search works when the site is hosted (or under wcl wdoc serve), not when a page is opened directly from disk.

§ 2Block reference

The @document root: the set of tags legal at the top level of a wdoc document — pages, sites, includes, templates, classes, and more.

PropertyTypeRequiredDescription

Child blocks

SlotAcceptsMultipleDescription
classesclassyes
stylesheetsstylesheetyes
pagespageyes
patternsinline_patternyes
templatestemplateyes
iconsetsiconsetyes
tilesetstilesetyes
themesthemeyes
componentswdoc_componentyes
generatorswdoc_repeateryes
partialspartialyes
bodiesbodyyes
sitessiteyes
agentsagentyes
includesincludeyes

A site block configuring one output target — its template, title, theme, navigation, search, and multi-site routing.

PropertyTypeRequiredDescription
nameidentifiernoOptional site name (the label slot). Required with more than one site; names the output subdirectory referenced by Page.sites.
rootboolnoWhen true, this site renders at / (others go under /<site>/).
default_templatesymbolno:webpage (header + top nav), :book (sidebar + TOC), :presentation (slide deck), or :ai_skill (skill folder, Markdown-only — build with wcl wdoc skill).
titleutf8noSite title shown in the header / sidebar.
summaryutf8noOne-line site description. Surfaced by included_sites(...) (not rendered by the built-in templates).
iconutf8noPath to a favicon image (svg/png/ico), resolved relative to the document and copied into _wdoc/. Absent ⇒ a default WCL icon is used.
stylesheetslist<utf8>noExternal stylesheet hrefs added to every page <head> as <link rel="stylesheet"> (verbatim — URL, copied asset, or shipped file).
scriptslist<utf8>noScript srcs added to every page <head> as deferred <script src=… defer> (verbatim hrefs).
fontslist<utf8>noWeb-font stylesheet hrefs added to every page <head> as <link rel="stylesheet"> (e.g. a Google Fonts URL).
assetslist<utf8>noFolders copied verbatim (recursively) into the site output — e.g. a Vite dist/. Resolved relative to the document; reference copied files by their output path.
theme_toggleboolnoWhen true, adds a light/dark toggle button.
searchboolnoWhen true, adds a client-side full-text search box (book and webpage templates).
themesymbolnoSymbol naming a colour theme block (:nord …) — see Styling.
accentsymbolnoSymbol naming the accent hue (:red..:pink); default :blue.
ui_themesymbolnoUI theme for wf_* wireframe elements (the mocked app's theme), separate from the document theme. Falls back to theme.
ui_accentsymbolnoAccent hue for wf_* wireframe elements; falls back to accent.
ui_modesymbolnoMode for wf_* wireframe elements — :dark (default) or :light.

Child blocks

SlotAcceptsMultipleDescription
toctocnoChapter tree for the book template.
menumenunoTop navbar entries for the webpage template.
sidebar_footersidebar_footernoPinned buttons at the bottom of the book sidebar.
deckdecknoSlide grid for the presentation template.
skillskillnoSkill metadata for the :ai_skill target — populates SKILL.md's front matter.