Standalone Astro documentation site for the impeccable command surface.
This repository does not run the upstream pbakaus/impeccable site directly. Instead, it pins the upstream repository as a vendor submodule, normalizes the upstream command catalog at build time, and renders localized HagiCode-owned docs content from this repository.
- Vendor source:
vendor/impeccable - Upstream command markdown reference:
vendor/impeccable/site/content/skills/ - Upstream category and relationship data:
vendor/impeccable/site/data/sub-pages-data.ts - Upstream command metadata:
vendor/impeccable/skill/scripts/command-metadata.json - Localized command body content:
src/content/commands/en-US/*.mdxsrc/content/commands/zh-CN/*.mdx
- Shared UI locale source of truth:
src/i18n/locales/en-US/*.ymlsrc/i18n/locales/zh-CN/*.yml
git submodule update --init --recursive
cd repos/impeccable-site
env -u NPM_CONFIG_PREFIX npm installIf the submodule is already present but stale, update it with:
cd repos/impeccable-site
git submodule update --remote vendor/impeccableReview the upstream pointer change, then regenerate derived assets before committing.
From repos/impeccable-site:
env -u NPM_CONFIG_PREFIX npm run dev
env -u NPM_CONFIG_PREFIX npm run typecheck
env -u NPM_CONFIG_PREFIX npm test
env -u NPM_CONFIG_PREFIX npm run build
env -u NPM_CONFIG_PREFIX npm run validatevalidate runs the full local gate: hagi18n checks, catalog parity, Astro typecheck, tests, and static build.
Shared chrome strings live in YAML and are committed as the source of truth:
src/i18n/locales/en-US/common.ymlsrc/i18n/locales/en-US/docs.ymlsrc/i18n/locales/zh-CN/common.ymlsrc/i18n/locales/zh-CN/docs.yml
Generated runtime resources are written to src/i18n/generated-locales/ by:
env -u NPM_CONFIG_PREFIX npm run i18n:generateUseful maintenance commands:
env -u NPM_CONFIG_PREFIX npm run i18n:audit
env -u NPM_CONFIG_PREFIX npm run i18n:doctor
env -u NPM_CONFIG_PREFIX npm run i18n:sync
env -u NPM_CONFIG_PREFIX npm run i18n:sync:write
env -u NPM_CONFIG_PREFIX npm run i18n:prune
env -u NPM_CONFIG_PREFIX npm run i18n:prune:write
env -u NPM_CONFIG_PREFIX npm run i18n:checkEvery upstream command slug must exist in both locale collections. The parity rules are enforced during catalog generation.
For English source-of-truth syncing, you can pull the upstream skill body content into the local en-US MDX files with:
env -u NPM_CONFIG_PREFIX npm run content:sync:vendorTo sync a single command only:
env -u NPM_CONFIG_PREFIX node scripts/sync-vendor-command-content.mjs --slug animateThis sync copies the upstream command body and tagline-driven summary into src/content/commands/en-US/*.mdx. Local frontmatter fields such as title, seoTitle, seoDescription, routeSlug, highlights, and related are preserved directly inside each MDX file so the site can keep its own presentation layer.
Add or update command docs in:
src/content/commands/en-US/<slug>.mdxsrc/content/commands/zh-CN/<slug>.mdx
The filename and frontmatter slug must match the upstream slug exactly.
Regenerate the normalized catalog with:
env -u NPM_CONFIG_PREFIX npm run catalog:generateCheck that generated output is current with:
env -u NPM_CONFIG_PREFIX npm run catalog:checkThe generated catalog lives at src/lib/generated/command-catalog.json.
i18n:generateconverts YAML locale sources into JSON runtime resources.catalog:generatereads vendor metadata plus per-locale MDX frontmatter and emits a normalized command catalog.- Astro routes consume the generated catalog and the localized command content collections.
- The site builds as static output only.
Before committing, run:
env -u NPM_CONFIG_PREFIX npm run validateThis should confirm:
- Vendor paths are present.
- Every upstream command slug exists in both
en-USandzh-CN. - Generated locale resources are fresh.
- Generated command catalog is fresh.
- Astro routes compile and static output builds successfully.
- Production command docs host:
https://impeccable.hagicode.com - Authoritative workflow:
.github/workflows/impeccable-site-deploy-gh-pages.yml - Production source of truth: the
gh-pagesbranch, published only by GitHub Actions - Published payload contract: branch root
esa.jsonc,wrangler.jsonc, anddist/containing the validated Astro snapshot - Build prerequisite in CI: the workflow checks out
vendor/impeccablerecursively before runningnpm run validate - Manual dispatch path:
workflow_dispatchrebuilds from the selected ref and republishes the validated payload togh-pages - Direct Cloudflare publication is handled outside this workflow; keep
gh-pages/wrangler.jsoncas the checked-in Wrangler contract for direct publish operations - Required GitHub permissions: the deploy job needs
contents: write; the build job stays read-only - Required hosting setting: configure the production host to read
gh-pages/esa.jsonc, treatgh-pages/wrangler.jsoncas the Wrangler source of truth for direct publication, and servegh-pages/dist/ - First deploy checks: confirm the workflow publishes
esa.jsonc,wrangler.jsonc, anddist/, verify the hosting target still points atgh-pages, and loadhttps://impeccable.hagicode.com - Rollback path: revert the source change or rerun deployment from an older commit so CI republishes the previous snapshot