tcm's docs site, as an app: the page the URL names (pageAt; the index for any other path), with a menu that filters in the browser. The frame and the menu render in the browser, from the index; what's rendered on the server from the codebase's pages is a page's text (DocsPage) and its sections in the menu (PageToc), so going to another page reads only those. A link to another page is followed in the app, and other links (the code browser, the examples) are the browser's. `tcm dev tcmts.site.Docs` serves it while you write; `pnpm docs:site` builds it as a static site, every page rendered as it's built.
A page rendered: its HTML, title and sections, the anchors it has, the links it makes to other pages (to check that their anchors resolve), and what's wrong with it.
The page kept in `file` (`apps.html`), rendered on the server: its text, and the pages before and after it. The published site (`pnpm docs:site`, which sets `TCM_SITE_VERSION`) says the commit it was built from, and links definitions to its code browser.
Make a built static site (`out`, its stylesheet `style.css`) quick to go through: the stylesheet is named by its content (`style.<digest>.css`, which `tcm serve --site` says to keep for good) in every page's link to it, and each page gets SPECULATION_RULES. Returns the stylesheet's new name.
writeCodeBrowser(b: Browsable, out: string, hl: HighlighterGeneric<BundledLanguage, BundledTheme>) => number
Write the pages to browse a codebase into `out` (`code/<name>/` in the docs site): one per namespace (what's in it, its README first) and one per definition (its doc, its code with every reference a link, where it runs, what it uses and what uses it), as tcm's editor pages show them. Returns how many definitions.
The menu down the side: every page, numbered, under its section, and the sections of the one being read (`toc`). A filter at the top narrows it to the pages whose names have what's typed; it's kept as the pages change.
The images pages show (``), by where they're kept in the repository, as tcmts.site.SOURCES has the pages: SVGs, shown in the page itself, so the site has no files to serve for them.
The site's pages as the codebase has them, by where they're kept in the repository: tcm's docs, and the examples' page. They're values, so the site depends on each by hash: changing a page changes the site.
Chrome's speculation rules for a static site: a page is prerendered while a link to it is pointed at (or pressed), so following it shows it at once. Downloads aren't.
STYLE"/* tcm-ts docs: a text file with a menu */\n:root { --bg: #fff; --fg: #111; --dim: #777; --rule: #…
Where a link to the page kept in `file` goes: the file itself in the static site, and its path without the `.html` in the app (`apps`, and `./` for the index), which renders it on the server.
The page of the site a path of the docs app is: `/` (the index), `/apps` or `/apps.html`; undefined for any other path (the code browser's, an example's), which isn't the app's.
One page, Markdown `md`, as plain, text-file-looking HTML: headings numbered like sections of a text file, code highlighted, two-column tables as lists of terms, images (IMAGES) in the page. Links to other pages go to their files; a link to something not on the site is shown as its path if `elsewhere` says it's a file of the repository, and is a problem otherwise.
A page of the site (`file`), rendered from its Markdown: once per request, however many server components show part of it (React's `cache`, which tcm keeps for the request). `codeBrowser`: link definitions to the code browser.
A page's {@link} to a definition is a link to its page in the code browser on the static site (shown as code in the app), with its own text if it gives one; one written in code stays as it's written
An image in a page is one of IMAGES, shown in the page (a data URL, so the site serves no file for it), and the target that shows it full size; an image that isn't one is a problem
A page links to the others by their files in the static site, and by paths without `.html` in the app (which renders only those on the server); code is highlighted, and a link to nothing is a problem.