Files
twosugar 8005765472 feat(migrate): build scripts + prebuild integrations for astro
- scripts/copy-routes.ts: rewritten to walk dist/**/*.index.html and
  copy each to the sibling flat path (foo/index.html → foo.html) for
  Nginx fallback contract §10; uses glob + fs-extra, no vitepress paths

- scripts/normalize_md.ts: rewritten as post-build dist cleanup; walks
  dist/**/*.md, trims trailing whitespace per line, ensures single
  trailing newline; resolves 5 pre-existing astro check errors caused by
  legacy imports from docs/.vitepress/... paths

- scripts/generate-llms.ts: rewritten as no-op; llms.txt / llms-full.txt
  are emitted at build time by T14 Astro endpoint pages

- src/integrations/prebuild-mcp-tools.ts: new integration; astro:build:start
  hook fetches https://mcp.longbridge.com/mcp/tools.json → .data/mcp-tools.json;
  stale-cache fallback on network error

- src/integrations/prebuild-skills.ts: new integration; astro:build:done
  hook clones github.com/longbridge/skills → .data/skills and zips to
  dist/skill/skills.zip; skips gracefully if git/zip not available

- astro.config.ts: import + wire prebuildMcpTools() and prebuildSkills()
  after regionHostnameRewrite() in integrations array

- .gitignore: add .data/ entry (7th file touched, necessary for the
  prebuild data cache directory)

astro check: 0 errors (5 pre-existing scripts/ errors resolved)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-17 19:27:52 +08:00

1.1 KiB