Invalid Link
The invalid link error indicates that an internal link in your Markdown or MDX files does not point to an existing page or asset in your docs site.
Common causes include typos, renamed or deleted pages, links to draft pages excluded from production builds, and links to assets that do not exist.
Example
Section titled “Example”For example, given the following project structure:
Directorypublic/
- whitepaper.pdf
Directorysrc/
Directorycontent/
Directorydocs/
Directoryguides/
- usage.mdx
- getting-started.md
With the following content in src/content/docs/getting-started.md:
---title: Getting Started---
## Next Steps
- [Setup guide](/guides/setup/)- [Usage guide](/guides/usage/)- [Whitepaper](/whitepape.pdf)Running a production build reports the following errors:
╭─ getting-started.md ·7 | /guides/setup/ · ╰── invalid link9 | /whitepape.pdf · ╰── invalid link
╭─ ─╮· Found 2 invalid links in 1 file. ·╰─ ─╯How to fix
Section titled “How to fix”To fix invalid link errors, update each broken link so it points to an existing page or asset.
For this example:
- Update
/guides/setup/to point to an existing page, or create the missing page if it should exist. - Update
/whitepape.pdfto/whitepaper.pdfso the asset path matches the actual file name.