vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
11.33k stars 1.83k forks source link

浏览器上的锚点不会动态变化 #3740

Closed haifenggo closed 3 weeks ago

haifenggo commented 3 weeks ago

Is your feature request related to a problem? Please describe.

vuepress中的锚点可以动态变化: 比如页面在 https://vuepress.vuejs.org/zh/config/#head 鼠标滚动后 路径变成了 https://vuepress.vuejs.org/zh/config/#cache

而vitepress默认没有锚点, https://vitepress.dev/zh/reference/default-theme-nav。 右侧目录的锚点是可以正常变化的, 点击右侧目录的某个锚点后, 浏览器上的url会出现对应的锚点, 但是不会随着网页移动而变化了。

Describe the solution you'd like

像vuepress那样,浏览器url默认出现当前网页的锚点,并且可以随页面变化而改变。

Describe alternatives you've considered

No response

Additional context

No response

Validations

brc-dd commented 3 weeks ago

That is too buggy to implement. It was there, but we removed it.