docs(site): tier the user guide and scaffold the Starlight site (#345) - #557
Merged
Conversation
docs-s1. Two things that are worthless apart: split the guide into a reference tier (dual-source: .qhp + site) and a guides/tutorials tier (site only), and stand up the Astro Starlight project that consumes it. Restructure. 34 tool/panel pages git mv'd into docs/user-guide/reference/ with their img/ folder; index.md stays at the guide root because it IS the manifest both pipelines read. Consumers updated in the same commit: index.md link targets, kToolPages/kDockPages, the hardcoded shortcuts.md path in test_shortcut_registry.cpp, docs/README.md, root README.md, ASSETS_LICENSES.md, and the qhp/main image handling. The link rewrite needed two passes and the first was wrong: targets already at ../../ (correctly reaching the repo root) needed a THIRD level, and the first regex's lookahead skipped exactly those. Redone from HEAD rather than patched. .qhp narrowed to the reference tier. build_toc skips tutorials/, and the dead machinery goes with it — the TocEntry::tutorial flag, the synthetic Tutorials TOC node, the tutorials/ <files> patterns. reference/ gets its own patterns and image-copy step, which is the #292 class of bug. docs-site/: pinned Astro Starlight, Node LTS via .nvmrc + engines, committed lockfile, and four scripts — theme-css (parses theme.cpp), adapt, licences, check-f1-coverage. The theme is a PARSER and not a C++ generator so the site build needs no C++ toolchain, keeping site CI independent of the CMake matrix as ADR-0009 requires. help.css bytes are untouched. The adapter caught 18 broken links the C++ gates structurally cannot see: with tutorials out of the .qhp pipeline nothing else validates them, and every one pointed at ../<page>.md for a page that had just moved. THE LICENCE GATE EARNED ITS PLACE. Astro's optional `sharp` pulls libvips binaries that are LGPL-3.0-or-later, and Qt is this project's only sanctioned LGPL dependency. --omit=optional does not work (it also drops rollup's required native binary) and @rollup/wasm-node does not engage, so `sharp` is overridden to a local no-op stub and astro.config.mjs uses passthroughImageService(). The gate also found zod-to-ts declaring no licence in package.json while shipping an MIT LICENSE file, so it now falls back to reading the file. Final tree: 373 packages, zero copyleft. NOT DONE, and not claimed: the acceptance item "verify F1 in a running editor, not only via the gate". No display available here. All four automated gates pass and a new site-side check asserts every F1-reachable slug exists in the adapted set, but the manual check remains outstanding. Fixes #345
Two CI failures from the restructure. clang-format: toc.hpp and test_help_registry.cpp were edited without running the formatter over them. docs link check: four docs outside the guide, plus two CHANGELOG entries, link directly at pages that moved into reference/ — persistence.md, ui-design.md, realism_defaults.md and gw3_corner_materials.md. I audited `user-guide/` only within a narrow set of files and missed anything that referenced a page from elsewhere in the tree; lychee globs docs/**/*.md AND the root *.md, so the CHANGELOG counts too. The one remaining broken target in the repo (a docs/img/ gif referenced from an archived release capture) predates this branch and is left alone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs-s1. Two things that are worthless apart, per the issue: split the guide
into a reference tier (dual-source:
.qhp+ site) and a guides/tutorialstier (site only), and stand up the Astro Starlight project that consumes it.
1–2. Restructure, and the
.qhpnarrowed to the reference tier34 tool/panel pages
git mv'd intodocs/user-guide/reference/with theirimg/folder.index.mdstays at the guide root because it is the manifestboth pipelines read — that shared manifest is the mechanism that stops the two
outputs drifting.
Consumers updated in the same commit:
index.mdtargets,kToolPages/kDockPages, the hardcodedshortcuts.mdpath,docs/README.md, rootREADME.md,ASSETS_LICENSES.md, and theqhp.cpp/main.cppimage handling.build_tocnow skipstutorials/, and what became dead is deleted ratherthan left inert: the
TocEntry::tutorialflag, the synthetic "Tutorials" TOCnode, the
tutorials/<files>patterns.reference/gets its own<files>patterns and image-copy step — fact 6's warning, and the #292 class of bug.
3–5.
docs-site/, adapter, CIPinned Astro 5.14.1 + Starlight 0.36.0, Node LTS via
.nvmrc+engines,committed lockfile, and four scripts:
theme-css,adapt,licenses,check-f1-coverage.The theme is a parser, not a C++ generator — justifying the issue's "your
call": ADR-0009 puts site CI on Linux-only Node runners independent of the C++
matrix, and a generated-artifact dependency would couple them. Parsing
theme.cppkeepstheme::graphite_amber()the single source of truth with nohand-transcribed hex and no build coupling. The committed
help.cssbytes areuntouched (
QTextBrowsercan't do custom properties).The adapter synthesizes
titlefrom each page's first H1 (the same rulebuild_tocuses), derives reference sidebar order fromindex.md, and failsnon-zero on a broken link naming source and target — proven by deliberately
breaking one.
CI is a new Linux-only Node workflow, path-triggered, uploading
distas anartifact and stopping there (no hosting resources). No C++ job changed.
The licence gate earned its place
Astro's optional
sharppulls libvips binaries that are LGPL-3.0-or-later.Qt is this project's only sanctioned LGPL dependency, and any other candidate
needs explicit maintainer approval — not mine to grant.
Two mechanisms that look right and are not:
--omit=optionalremoves sharp and rollup's required native binary.@rollup/wasm-nodedoes not engage as a fallback on this rollup.What works:
overridespointingsharpat a localstubs/sharpno-op thatthrows with a clear message if anything imports it, plus
passthroughImageService(). Narrow, declarative, and re-proven every CI run.The gate also found
zod-to-tsdeclaring no licence inpackage.jsonwhileshipping an MIT
LICENSEfile, so it falls back to reading the file rather thanfailing a permissive package. Final tree: 373 packages, zero copyleft.
Verification
ctest --preset ci-macos— 3281/3281 pass, including all four help gates(
test_help_registry,test_help_collection,test_help_style,test_shortcut_registry)npm ci && npm run build— 40 pages built, licence gate green, F1coverage green (20 slugs)
Not done, and not claimed
The acceptance item "F1 resolves correctly … verify in a running editor, not
only via the gate" is outstanding: no display is available in this
environment. All four automated gates pass, and a new site-side check asserts
every F1-reachable slug exists in the adapted set — but the in-editor check is
still needed before this is considered fully accepted.
Fixes #345