Skip to content

docs: glob error code pages and rehost devframe nav#316

Merged
antfu merged 1 commit intomainfrom
antfu/glob-error-codes
May 8, 2026
Merged

docs: glob error code pages and rehost devframe nav#316
antfu merged 1 commit intomainfrom
antfu/glob-error-codes

Conversation

@antfu
Copy link
Copy Markdown
Member

@antfu antfu commented May 8, 2026

Description

  • Replace Array.from({ length: N }, ...) with tinyglobby over the actual *.md files in docs/errors/ and devframe/docs/errors/ so the sidebar list survives non-contiguous codes (no dead links when a code is removed; no manual length bump when one is added).
  • Merge devframe/docs/.vitepress/sidebar.ts into config.ts and add a new devframeNav(prefix) export so the parent docs site can rehost devframe's nav.
  • The DevFrame entry in the main top nav is now a detailed dropdown (sibling parity with "DevTools Kit") instead of a single link to /devframe/. Both the parent and the standalone devframe sites consume the same shared guideItems() to stay in sync.
  • Broaden the .vitepress/cache ignore from docs/.vitepress/cache to **/.vitepress/cache to also cover the standalone devframe site.

Linked Issues

Additional context

tinyglobby does not guarantee sort order across platforms, so the helper applies an explicit .sort() on the discovered codes.

Replace `Array.from({ length: N }, ...)` with tinyglobby over the actual
`*.md` files in `docs/errors/` and `devframe/docs/errors/` so removed or
non-contiguous codes don't produce dead links. Merge the standalone
`sidebar.ts` into `devframe/docs/.vitepress/config.ts` and add a
`devframeNav(prefix)` export so the parent docs site can rehost the
DevFrame nav as a detailed dropdown instead of a single link. The
standalone devframe site now uses the same shared `guideItems()` to
keep both navs in sync.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@antfu antfu merged commit ac27c6d into main May 8, 2026
7 checks passed
@antfu antfu deleted the antfu/glob-error-codes branch May 8, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant