Local previews and CI are advanced features. Most brand owners do not need them. They are for studios authoring at scale and for engineering-led brand teams.
Local preview
The Brand Atlas CLI (brand-atlas on npm) renders an atlas locally:
preview in an atlas repo:
- Starts a local web server on
http://localhost:3030. - Renders the atlas as the portal would render it.
- Watches for file changes and re-renders.
- Authoring a Horizon. Edit the MDX, see the result without uploading.
- Iterating on style. Watch how voice rules read in the rendered form.
- Cross-checking links. Internal links resolve the same way as in production.
- No Henry or Oswald (the AI assistants require the live portal).
- No Update Requests (they are a live-only workflow).
- No Guest Passes (live-only).
Validating content locally
The CLI includes a validator:- MDX parses.
- Frontmatter is complete and well-formed.
- Components are in the supported set.
- Assets exist.
- Internal links resolve.
- Voice rules pass.
A CI workflow with GitHub Actions
A starter.github/workflows/validate.yml:
validate. The full validator described above.check-links. Specifically catches internal-link breakage. Useful as a separate job because link breakage is a different kind of problem.
A pre-commit hook
For local enforcement, a pre-commit hook ensures the validator runs before any commit:chmod +x .git/hooks/pre-commit.
The hook is per-developer (not shared via the repo by default). For team-wide hook management, use husky or similar.
Multi-atlas CI
For agencies running multiple atlases, a single CI workflow can validate all of them in parallel:Linting beyond validation
The validator catches structural problems. Two further linters are useful:markdownlint. Catches Markdown-shape issues (heading hierarchy, list consistency).- A voice linter. Brand Atlas’s
voice-rules.jsoncan be consumed by an MDX-aware linter to surface banned vocabulary, suggest owned vocabulary, and flag voice-rule violations. The CLI ships a sample configuration.
Performance budgets
For atlases with large image or asset libraries, the CLI includes a performance budget check:- Total size of the atlas.
- Largest individual assets.
- Pages where rendered content exceeds a threshold (default 500KB).
Deploying through CI
For repo-direct workflows, every push to main is the deploy. The portal picks up the change within seconds. No separate deploy step is needed. For staged deployments (a preview branch for major changes), use a feature branch in the repo and switch the atlas’s branch in Settings → Advanced → Active branch. Switching back to main rolls the staged changes into production.Related pages
The GitHub-repo content model
The repo model.
Authoring in MDX
The format reference.
Managing multiple atlases
Multi-atlas patterns.