---
title: Validation
description: 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`:

1. **Run strict checking**

    ```sh
    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.

2. **Build the production site**

    ```sh
    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.

3. **Serve the generated output**

    ```sh
    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.

> **Info**
>
> Stop development before ordinary check and build commands: they regenerate
> `.brandtree/`. To check while dev runs, use `pnpm brandtree check --strict
> --isolated`. There is no isolated build flag.

## 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:

```sh
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](/fonts).

**Checking unfinished pages**

Use `check --strict --isolated --preview` to include drafts while reviewing
work in progress. Development already includes drafts. Keep preview checks
separate from the normal production review.
