mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-03 19:32:35 +02:00
fix(utils): do not resolve Markdown paths with @site prefix (#6489)
This commit is contained in:
parent
8a912c708e
commit
556f59b193
3 changed files with 5 additions and 1 deletions
|
@ -75,6 +75,8 @@ Throughout the documentation, we always try to be unambiguous about whether we a
|
|||
|
||||
When writing links in Markdown, you could either mean a _file path_, or a _URL path_, which Docusaurus would use several heuristics to determine.
|
||||
|
||||
- If the path has a `@site` prefix, it is _always_ an asset file path.
|
||||
- If the path has an `http(s)://` prefix, it is _always_ a URL path.
|
||||
- If the path doesn't have an extension, it is a URL path. For example, a link `[page](../plugins)` on a page with URL `/docs/advanced/routing` will link to `/docs/plugins`. Docusaurus will only detect broken links when building your site (when it knows the full route structure), but will make no assumptions about the existence of a file. It is exactly equivalent to writing `<a href="../plugins">page</a>` in a JSX file.
|
||||
- If the path has an `.md(x)` extension, Docusaurus would try to resolve that Markdown file to a URL, and replace the file path with a URL path.
|
||||
- If the path has any other extension, Docusaurus would treat it as [an asset](../guides/markdown-features/markdown-features-assets.mdx) and bundle it.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue