The ztcl docs site

Flight Manual builds the docs site of ztcl: the pages that tools/build-docs.py of ztcl lists, the lessons of the Learn course, the pages of the command reference, the landing page, the playground, and the shell. The files are in sites/ztcl/:

File What it has
site.fm The site file: the title, the URL, the repository, the assets, and the plugin.
pages.fm The list of pages and the groups of the menu, from the list PAGES of build-docs.py.
style/page.html, style/head.html The page template of the ztcl site. The style sheets are the files of docs/site/ of ztcl.
ztcl.tcl The plugin: the lessons, the pages of the reference, the live examples, the shell of a page and of the course, the helpers, the Run links, the first link of a command in a lesson, and the redirects of old page paths.
prepare.sh Writes the JSON files of the reference with tools/refdoc.tcl of ztcl. The plugin reads them, so Flight Manual needs no exec.

Build it

sites/ztcl/prepare.sh ZTCL
build/flight-manual build -site sites/ztcl/site.fm -root ZTCL OUT

ZTCL is a checkout of ztcl with its runner in zig-out/bin and the files zig-out/lib/*.wasm of the playground.

The compare

tools/compare-ztcl.sh ZTCL PYTHON OUT builds the site with build-docs.py and with Flight Manual, and runs tools/compare-sites.tcl on the two sites. The tool compares each page: the set of pages, the headings of <main> (the level, the id, and the text), and the links of the whole page. It then checks each relative link and each anchor of the site of Flight Manual.

The result on 2026-12-02, with ztcl at 671641ca, on Linux x86_64 (the ztcl runner is a ReleaseSafe build, and the runner of zig-out/bin that refdoc.tcl uses is a Debug build):

Check Result
Pages 982 in each site, 982 in both
Pages with other headings 0
Link differences 40, each of a kind below
Link differences not explained 0
Dead links and anchors of Flight Manual 0
Build Time Peak memory
build-docs.py, with its run of refdoc.tcl 7.91 s 87 MB
prepare.sh (refdoc.tcl) 4.54 s 86 MB
flight-manual build 1.89 s 142 MB

The 40 links that differ are of two kinds. Each kind is a decision of the design, and tools/compare-sites.tcl -url URL counts it apart from the rest. The tool exits with 1 for a link difference of another kind.

The pictures

The markup of Flight Manual differs from the markup of build-docs.py in three places: the menu is a <ul> in each group, a note is a <blockquote> with a title, and a part of a group is <p class="part">. sites/ztcl/style/fm.css gives this markup the look of the style sheet of ztcl, and the plugin gives the pages of the course and of the reference the class course on <body>, as build-docs.py does.

The compare of the pictures, on 2026-12-02: 10 pages (overview, install, quick start, the first lesson, the reference, reference/string/, modules, limits, FAQ, and security), each in the light, the dark, and the phone view of tests/browser.mjs, in Chromium. compare -metric AE -fuzz 2% of ImageMagick counts the pixels that differ:

Pages Pixels that differ
9 pages, in each view 0
overview, light, dark, and phone 546 to 605: the two bare URLs of the text that Flight Manual makes links (the autolinks above)

What differs and is not in the compare:

Next: The Hangar Floor docs site.