Expand description
Shared test helper: turn a generated mdBook-format reference page into the
Starlight page committed under site/src/content/docs/. This is the
same transform site/scripts/migrate-page.mjs applied during the Book
migration — lift the leading # H1 into title: frontmatter (dropping the
heading), and rewrite relative .md links to site routes — so the
generated-page drift guards keep their committed site pages byte-identical to
the migrated originals once docs/ is gone.
Functions§
- to_
site_ page - Transform
markdown(a generated reference page, mdBook form) into its committed Starlight form.page_diris the page’s directory, as the Book’s mdBook sources lay it out (e.g."reference"), used to resolve relative links. A link that resolves intoreference/is a Reference route (web presence slice 5); any other, a Book route.