Pages

A page block declares one rendered HTML page. Each page joins one or more sites and holds the content blocks that make up its body.

Fields

PropertyTypeRequiredDescription
nameidentifieryesThe page name (the inline label); becomes the output filename (<name>.html / .md).
ididentifiernoOptional explicit HTML id.
titleutf8noHuman-readable page title; sets the browser tab title (<title>). Falls back to the page name.
templatesymbolnoTemplate to wrap the page in; overrides the site's default_template.
siteslist<symbol>noNamed sites this page belongs to; absent ⇒ every site.
startboolnoMark this page as the site's start page (served at /).

Child blocks

SlotAcceptsMultipleDescription
frontmatterfrontmatternoOptional YAML front matter for the Markdown target (Markdown only).
childrenWdocBlockyesThe page's content blocks.

A page

import <wdoc.wcl>

page index { sites = [:mysite]  start = true
  h1 "My project"
  p "A short intro."
}

Per-site page names

Page names are unique per site, so two different sites can each have a page called index. A page with no sites field is shared with every site.

Cross-page links

Inside any p or span, write a markdown-style link where the URL is a bare page name for an in-site link, or sitename:pagename for a cross-site link. Links to unknown pages are build errors, so renaming a page can't silently break navigation.

p "See [the about page](about) or jump to [the docs](docs:index)."