Replies: 1 comment
-
Good question @K4zoku, I agree this one is a bit of a nuisance, MkDocs has some implicit rules for links that are a little unintuitive to me. You can use absolute links as you have in point 2, just link as if the file is a directory, as is the final published URL, rather than the Otherwise use a relative path as in 3, but I agree that it's inconvenient to have to work out how the final output is structured. Longer term, adding a |
Beta Was this translation helpful? Give feedback.
-
Description
Linking to an entry on the same page is straightforward: just use
#target
. Linking to an entry on another page is also simple:another_page.md#target
. However, when the target is inside a group (e.g.,example_group
), I am unsure how to create the link.Things Tried
example_group#target
current_page/example_group#target
./example_group/target_page.md#target
target_page.md
with the corresponding page.Relative paths (e.g.,
../example_group/target_page#target
or../example_group/#target
forindex.md
)Request
How can I correctly link to a specific target inside a group in MkDocs without relying on the build output structure?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions