You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The @vuepress/plugin-active-header-links should special treat and understand <h1> tags, unless the first non <h1> heading reaches top, the plugin should remain the url "hash clean"
Possible solution
vuepress-theme-hope@v1 is using a improved plugin @mr-hope/vuepress-plugin-active-hash forked from @vuepress/plugin-active-hash.
E.g. when visiting https://v2.vuepress.vuejs.org/zh/guide/page.html
You will find out that the page loads and changed to https://v2.vuepress.vuejs.org/zh/guide/page.html#路由
While https://v2.vuepress.vuejs.org/zh/guide/configuration.html won't
Problem
The
@vuepress/plugin-active-header-links
should special treat and understand<h1>
tags, unless the first non<h1>
heading reaches top, the plugin should remain the url "hash clean"Possible solution
vuepress-theme-hope@v1
is using a improved plugin@mr-hope/vuepress-plugin-active-hash
forked from@vuepress/plugin-active-hash
.See https://vuepress-theme-hope.github.io/guide/get-started/intro/ as a demo, the plugin will try to empty the hash when scrolling to top, that should be the expect behavior.
Edited:
The current behavior fit most situation, becuase the plugin won't try to scroll page if the hash match the first heading.
But it will have problems when a page has a long excerpt:
The text was updated successfully, but these errors were encountered: