Conversation
There was a problem hiding this comment.
Pull request overview
Updates the TypeDoc → Astro API reference pipeline to use module-based routing (one page per public entrypoint) and tightens verification to ensure the generated reference layout matches the expected file set.
Changes:
- Switch TypeDoc markdown output from
router: 'member'torouter: 'module'and adjust entrypoint ordering. - Update API docs config + postprocessing to target
<module>.mdpages (and removemodules.md). - Extend docs verification to validate the generated API reference file layout and navigation paths, and improve trailing-slash link resolution.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| typedoc/verify-docs.ts | Adds API reference root awareness, generated-layout verification, and navigation path validation updates. |
| typedoc/postprocess-site-docs.ts | Adapts postprocessing for module-router output, deletes modules.md, and updates title/order derivation based on new page paths. |
| typedoc/api-docs-config.ts | Renames/updates expected generated API page paths from /index.md pages to <module>.md pages. |
| typedoc.config.mjs | Switches TypeDoc markdown router to module and reorders entry points accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const internalLinkPattern = /(!?\[[^\]]*])\(([^)#\s]+)(#[^)]+)?\)/g; | ||
| const breadcrumbPattern = /^\*\*.+?\*\*\r?\n\r?\n\*\*\*\r?\n\r?\n/; | ||
| const leadingHeadingPattern = /^# .+\r?\n\r?\n/; | ||
| const generatedPreamblePattern = /^[\s\S]*?\r?\n# .+\r?\n\r?\n/; |
There was a problem hiding this comment.
generatedPreamblePattern requires a newline before the first # heading (...\n# ...), so it will not strip a leading H1 when the file starts with # ... at byte 0. Since the configured TypeDoc readme source (typedoc/generated-reference-intro.md) begins with # Generated reference, the generated index.md can end up keeping its H1 after postprocessing (duplicating the page title rendered from frontmatter). Consider adjusting the regex to also match headings at the start of the file (or reverting to separate breadcrumb + leading-heading removals).
| const generatedPreamblePattern = /^[\s\S]*?\r?\n# .+\r?\n\r?\n/; | |
| const generatedPreamblePattern = /^[\s\S]*?(?:^|\r?\n)# .+\r?\n\r?\n/; |
No description provided.