You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add link to your doc in Blog post with extension (e.g. file.mdx, like me)
Build the application
Expected behavior
The link should be considered a valid link.
Actual Behavior
"Broken links" complain it's broken. It will only be considered valid, if it doesn't contain an extension. It's inconsitent, since link in docs to docs can have extensions.
Kinda looks like links in /docs can point to files, but links in blog point to URL? It's really unintuitive.
Error: Broken links found!
- Page path = /blog:
-> link to ../../docs/filter.mdx#filter-by-keys (resolved as: /docs/filter.mdx)
- Page path = /blog/2019/08/31/super-duper-stargazers:
-> link to ../../docs/filter.mdx#filter-by-keys (resolved as: /blog/2019/docs/filter.mdx)
Note: it's possible to ignore broken links with the 'onBrokenLinks' Docusaurus configuration.
Linking using md file paths only works for docs, it's not possible to link from/to blog this way, because the fs path to URL resolution system is plugin dependant (slug frontmatter etc...)
It is pretty sure that this link was not reported before, but it was actually broken in practice, so this new system likely catched a bug on your site :)
Activity
slorber commentedon Aug 9, 2020
Hi @danon
Linking using md file paths only works for docs, it's not possible to link from/to blog this way, because the fs path to URL resolution system is plugin dependant (slug frontmatter etc...)
It is pretty sure that this link was not reported before, but it was actually broken in practice, so this new system likely catched a bug on your site :)
danon commentedon Aug 9, 2020
@slorber Yes, you're right, it found a bug.
Sorry to have taken your time.