-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[[toc]] only generate same link when two or more headers are same #2030
Comments
That could be an issue of markdown-it-table-of-contents. You can try vuepress-plugin-table-of-contents |
Thanks, man! It seems that markdown-it-table-of-contents has not been maintained for a long time. vuepress-plugin-table-of-contents works well. Hopefully, vuepress will replace it as default toc compoent. |
We used to replace it, but reverted in a previous version due to some reasons. Maybe it could be the default toc component in a future version |
I agree, let's check if |
I remembered that it was not a complex issue. @ludanxer if you are interested, I could help to find the history:
|
Bug report
When there are two or more headers in same name, the [[toc]] only generates one link for all same name headers. Other headers cannot be navigated to the right positions. Btw, the sidebar works well!
Steps to reproduce
What is expected?
They should be different links:
First "Header 2":
localhost:8000/docs/test/test.html#header-2
Second "Header 2":
localhost:8000/docs/test/test.html#header-2-2
What is actually happening?
They are same:
First "Header 2":
localhost:8000/docs/test/test.html#header-2
Second "Header 2":
localhost:8000/docs/test/test.html#header-2
Other relevant information
npx vuepress info
in my VuePress project:Environment Info:
The text was updated successfully, but these errors were encountered: