Basic Usage
Default link text
Custom link text
Properties
Page path from
docs.json. Must match navigation entries exactly.Examples: quickstart, guides/setup-guide, components/type-treeLink text. Defaults to the page path if omitted.
Type Safety
PageLink validates links in two ways: Compile-time - TypeScript checks againstValidPages.d.ts:
ValidPages Set and applies styling:
Valid vs broken links
- Red color (#ef4444)
- Red dotted underline (2px)
- Red wavy text decoration
- Tooltip showing the error
Examples
Linking to different page types
Page Paths
Page paths must matchdocs.json navigation entries:
/ is added automatically if missing.
Fixing Broken Links
Links break when pages are removed fromdocs.json, renamed, or moved.
- Check TypeScript error in IDE
- Verify page exists in
docs.jsonnavigation - Update target to match exact path
- Run
mint-tsdocs generateif navigation changed
Best Practices
Use PageLink for guides/concepts, RefLink for API references
Use exact paths from docs.json
Avoid hardcoded absolute paths
Fix broken links before committing
Troubleshooting
Component not found
Component not found
Run
mint-tsdocs generate to copy components to docs/snippets/tsdocs/All links broken
All links broken
- Check
ValidPages.jsxexists indocs/snippets/tsdocs/ - Run
mint-tsdocs generate - Refresh browser
Page exists but link broken
Page exists but link broken
Verify the page is listed in
docs.json navigation and path matches exactly (case-sensitive).No IDE autocomplete
No IDE autocomplete
Due to an MDX extension bug, try:
- Use relative path while editing:
"../snippets/tsdocs/PageLink.jsx" - Get autocomplete
- Change back to absolute:
"/snippets/tsdocs/PageLink.jsx"

