Create a MD page add headers. Then add [[toc]] above them.
The table of contents should render and the links should anchor to the appropriate headers on a single click
Two clicks are being required. The URL gets updated with the hash but nothing happens until you click again. This behavior is also happening within the documentation here.
npx vuepress info in my VuePress project:Environment Info:
System:
OS: macOS 10.15.4
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 12.18.2 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.5 - /usr/local/bin/npm
Browsers:
Chrome: 84.0.4147.89
Edge: Not Found
Firefox: 78.0.2
Safari: 13.1
npmPackages:
@vuepress/core: 1.4.1
@vuepress/theme-default: 1.4.1
vuepress: ^1.4.1 => 1.4.1
npmGlobalPackages:
vuepress: Not Found
Not sure if related, but if smooth scrolling is disabled, anchors doesn't work at all when navigating via URL.
Eg, try navigating this URL: https://naninovel.com/guide/integration-options.html#switching-modes The page won't scroll to the specified anchor.
Reproduced with VuePress v1.5.2 on Chrome; Firefox works fine.
Most helpful comment
Not sure if related, but if smooth scrolling is disabled, anchors doesn't work at all when navigating via URL.
Eg, try navigating this URL: https://naninovel.com/guide/integration-options.html#switching-modes The page won't scroll to the specified anchor.
Reproduced with VuePress v1.5.2 on Chrome; Firefox works fine.