Closed bjoernmartin closed 1 month ago
read the sentence again, it's to go to foo/index.md#heading
from foo/one.md
what you've written is how you jump to different header within the same file
It still fixed working with Vitepress for me, so no idea how your explanation invalidates that. But who am I to force you accepting help?
That section reads:
For example, given the following directory structure:
. ├─ index.md ├─ foo │ ├─ index.md │ ├─ one.md │ └─ two.md └─ bar ├─ index.md ├─ three.md └─ four.md
And providing you are in `foo/one.md`:
...
[foo heading](./#heading) <!-- anchors user to a heading in the foo index file -->
So, if you make it
[foo heading](#heading)
It will go to /foo/one.html#heading
not /foo/#heading
The original version might have caused issue for you because you might not have a foo/index.md
in first place. So, trying to link to it rightfully threw dead link found error.
Working with vitepress v1.3.3, I noticed a link in the format
./#heading
does not work / leads to a docs generation error, whereas#heading
works for me. Hence this PR.Description
Linked Issues
Additional Context