Skip to content

Publishing the docs site ​

How /guide and /api on https://neo-trixs.github.io get updated. Two repos, one rule: the homepage is code, the docs are output. This page is the manual pipeline on purpose — nothing here runs by itself.

RepoHoldsChanges how
neo-trixs/NeoTrixdocs/ — the VitePress source (markdown, config.ts)normal commits
neo-trixs/neo-trixs.github.iothe published pages (guide/, api/, assets/, index.html)this page's steps

What is generated and what is hand-built ​

  • Generated (never edit by hand in the site repo): guide/*.html, api/*.html, assets/* (hashed chunks), hashmap.json, vp-icons.css, 404.html, icons/, and the logo* / hero.svg / background.svg copies.
  • Hand-built (never overwritten by a docs build): index.html (the star map), llms.txt, robots.txt, sitemap.xml, design/, tests/, tools/, vendor/.

If a docs build is copied wholesale, it replaces index.html with the VitePress home and the star map disappears. Sync the generated directories only.

Publish a docs change ​

sh
# 1. source side — make the change and land it
cd <NeoTrix>
$EDITOR docs/4-GUIDES/getting-started.md
git commit -am "docs: …" && git push            # (main is protected; land per repo rules)
SRC=$(git rev-parse --short HEAD)

# 2. build in a clean worktree so WIP elsewhere cannot leak in
git worktree add /tmp/nt-docs origin/main
cd /tmp/nt-docs/docs
npm install --no-audit --no-fund
npx vitepress build            # → docs/.vitepress/dist

# 3. sync generated output into the site repo
cd <pages-repo>
D=/tmp/nt-docs/docs/.vitepress/dist
rsync -a --delete "$D/assets/" assets/
rsync -a --delete "$D/guide/"  guide/
rsync -a --delete "$D/api/"    api/
rsync -a --delete "$D/icons/"  icons/
cp "$D/404.html" "$D/hashmap.json" "$D/vp-icons.css" \
   "$D/logo-animated.svg" "$D/logo.svg" "$D/favicon.svg" \
   "$D/hero.svg" "$D/background.svg" \
   "$D/github-social-preview.png" "$D/github-social-preview.svg" .

# 4. gates, then publish
npm test
git add -A && git commit -m "docs(site): rebuild from NeoTrix@$SRC" && git push

# 5. tidy
cd <NeoTrix> && git worktree remove /tmp/nt-docs

GitHub Pages redeploys in about 30–60 seconds. Verify the actual pages, not the build log:

sh
curl -s -o /dev/null -w '%{http_code}\n' https://neo-trixs.github.io/guide/what-is-neotrix
curl -s https://neo-trixs.github.io/ | grep -c cap-grid      # star map still there

Pre-flight checks ​

CheckWhy
npm test in the site repoduplicate ids, tag balance, required anchors, module syntax, i18n, search, wheel zoom, reduced-motion
curl … | grep -c cap-grid after deployproves the sync did not overwrite the star map
grep the count you just changedclaims like the architecture-gate count appear in index.html, llms.txt and the built guide pages; a source-only edit leaves the site contradicting itself

When numbers change ​

Numbers that appear on both sides of the split — gate count, test count, crate count, capability modules — live in three places and are not generated from one another:

  1. docs/index.md + README.md (source, feeds /guide)
  2. index.html meta / Open Graph / JSON-LD / footer (hand-built)
  3. llms.txt (hand-built, read by AI agents)

Change all three in the same session, then rebuild. A claim left behind on one side is the drift this project already paid for once.

The star map data ​

The 373 planets on the homepage come from .neo/capability_registry.json via tools/build_galaxy.py in the site repo:

sh
python3 tools/build_galaxy.py <NeoTrix> galaxy.js
# paste the single `const GALAXY = …;` line into index.html

Edit index.html directly and the page will disagree with the registry. Rebuild from the registry, then paste — do not hand-edit the data line.

What is deliberately not automated ​

An earlier revision ran a scheduled GitHub Action that rebuilt these pages daily. It was removed: it published without a human reading the diff, it needed cross-repo credentials to be useful for anything faster than daily, and it produced commits from machine-local asset hashing. The manual pipeline above replaced it. If the automation ever comes back, it must keep the star map out of its sync set and stop when the source commit has not moved.

Troubleshooting ​

SymptomCauseFix
Homepage turned into the VitePress landingthe whole dist/ was copiedrestore index.html from git, re-sync only the listed paths
Page Not Found on a guide URLpage not in config.ts sidebar/rewrites, or srcExcludecheck docs/.vitepress/config.ts
Old styles after deploystale hashed assetsrsync --delete on assets/ (not a plain copy)
EEXIST: symlink from npm testnode_modules/three symlink exists alreadyrm -rf node_modules/three and rerun

Released under the MIT License (with proprietary exceptions for security modules).