THE GITHTML FIELD GUIDE
Check an Astro Starlight documentation build locally
Use the existing Astro Starlight project's maintained build script, then inspect its production output with the matching local preview. Check content schema errors, representative routes, and visible text before sharing the artifact. A successful development page does not prove all documentation entries build correctly, and a generated site is not automatically one portable HTML document.
Inspect the project's content and command contract
Locate the project configuration, package scripts, and content collection setup. Starlight conventions may evolve, so use the installed version's project structure rather than copying paths blindly from an older tutorial. Identify where documentation pages, assets, and custom components live. Read build scripts for additional checks or data-fetching steps before execution, especially in an unfamiliar repository. Use the maintained dependency environment and keep production credentials out unless a reviewed build requirement genuinely needs them. Record which source revision and configuration are being tested so the artifact can be associated with the correct content review.
Build representative pages, not only the landing screen
The sample commands assume the project defines the usual build and preview scripts. Check package metadata first. Resolve front matter or schema diagnostics by comparing the page with the project's documented content requirements; do not delete metadata fields simply to silence an error without understanding their purpose. Preview a top-level guide, a nested reference, a page with code, and a page using a custom component. Confirm that essential explanations are visible in production output and that internal links reach the intended routes. Development conveniences can hide missing production assumptions, so inspect the built artifact rather than only the live authoring server.
npm run build
npm run previewSeparate content acceptance from distribution acceptance
A local production review can establish that the site's pages and resources were generated as expected. It does not establish hosting configuration, access control, or complete offline behavior. If the requirement is a reading copy for a single document, prepare that export separately and check its dependencies. gitHtml reads committed HTML files; it does not execute Astro or turn Markdown into a Starlight site. Keep build output and authoring source conceptually distinct when handing the work to another person. Include the command, environment, reviewed routes, and remaining distribution assumptions in the handoff so a successful local check is not mistaken for proof of every downstream deployment behavior. Include at least one recently changed content entry in the review list. Familiar pages can render correctly while a new schema field or custom component fails only on the newly authored material.
- Inspect project scripts, content schema, version, and build-time code before running commands.
- Build locally and investigate schema errors at their source.
- Review representative nested pages and custom content in production preview.
- Record the artifact's distribution assumptions separately from the content checks.
Sources and further reading
AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.