Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

Validation

Check source inputs and review the generated site before a release.

Validation has two parts: check that authored inputs are valid, then review the site they produce. A successful build alone can miss an omitted content page or a font that silently fell back.

Check your inputs

Run these commands from your project root, containing brandtree.config.ts:

Run strict checking

pnpm brandtree check --strict

Strict checking fails preparation on content error diagnostics, including invalid frontmatter. Without it, preparation can continue with invalid pages omitted. Type errors, malformed YAML, invalid config, and unsafe source paths also fail checking. Warnings alone remain nonfatal.

Build the production site

pnpm brandtree build

This generates static output in dist/. Draft pages are omitted. The build command has no strict or preview flag, so keep the strict check as a separate release gate.

Serve the generated output

pnpm brandtree preview --port 4322

Open the printed URL and follow real page links. Preview serves the build through its generated Astro app without rebuilding. Keep both .brandtree/ and dist/ from the build; if either is missing, build again.

Use your project scripts

Init adds check, build, and preview scripts to a new project’s manifest. The generated check script does not include --strict, so supply it when preparing a release:

pnpm check --strict
pnpm build
pnpm preview --port 4322

These scripts use the Brandtree version installed in your project. Keep the lockfile committed so your team and CI resolve the same dependency versions. Production output is always in your project’s dist/.

Review the output

  • Follow cover links, group overviews, nested pages, the table of contents, and previous/next links.
  • Switch languages and check missing translations, fallback pages, and RTL layouts.
  • Review light and dark themes, including with JavaScript disabled.
  • At narrow widths, confirm tables and specimens scroll inside their own containers.
  • Inspect logos, font faces, image descriptions, and the contents of downloaded files.
  • Check page titles, descriptions, canonical URLs, indexing choices, and generated social cards under dist/og/.

A fallback font can still produce a successful build. Inspect the card images and confirm every required writing system renders; see Fonts.

Was this page helpful?