@xtandard/kit/site — the docs-site tooling shared by the xtandard products (Astro Starlight
over the repository’s Markdown, plus a TypeDoc API reference):
defineSiteManifest: the information architecture (pages, sidebar, pending guides) and
apiEntries() (one module per exports entry);
syncSite / runSync: the pre-build step that writes site/src/content/docs/;
defineXtandardSite: the Astro config (Starlight, starlight-typedoc, Mermaid, links validator,
head tags);
createTypedocPlugin and apiOverviews: the API reference’s named return types, re-export
lists and overview pages.
Optional peers, loaded from the site’s own install: astro, @astrojs/starlight,
starlight-typedoc, typedoc, typescript, astro-mermaid, starlight-links-validator.
Every public entry point of the package at repoRoot, in exports order. Skips stylesheets, wildcards, JSON and ./package.json. A subpath maps to src/entry-<subpath with dashes>.ts when that file exists, otherwise to src/<subpath>.ts(x); the root maps to src/index.ts.
Create the TypeDoc plugin for the site at siteDir. Pass the returned function in TypeDoc’s plugin option (TypeDoc 0.26+ accepts plugin functions and awaits them).
Import package name as installed for the site at siteDir; when the site doesn’t have it, fall back to a plain import() from the kit (and a clear “install it” error when that fails).
The API entry files in documentation order: apiOwners first (a symbol exported by several entry points is documented under the first one TypeDoc meets), then the rest alphabetically — a fixed order, since a glob’s order differs between file systems. Throws when an owner is not an entry point.
The ESM entry file of package name as installed for fromDir (looking in node_modules from fromDir upwards), or undefined when it isn’t installed there.