-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Description
Description
As mentioned in #2593 , the use of a Coverpage Title as a link to the main content of a Docsify site can be problematic due to the repeated use of the same id, however in v5 RC-1 this seemed to be supported (as expected).
Expected behavior
When there is H1 (title) in the Coverpage, this link when clicked should go to the first matching id in the main content area of Docsify, and not on the matching id within the Coverpage itself. The coverpage will always be displayed as the landing page for a Docsify site, so navigating to an id within the one screen long Coverpage is highly unlikely.
Actual behavior
Currently, clicking on the H1 (title) of the Coverpage scrolls the Coverpage halfway up to where the H1 link is.
Docsify v5 preview codsandbox, click on coverpage title:
https://codesandbox.io/p/sandbox/docsify-v5-preview-coverpage-2d82hj
However, in Docsify v5 RC-1 this issue did not seem to be present, and works as expected:
Docsify v5 RC 1 codsandbox, click on coverpage title:
https://codesandbox.io/p/sandbox/docsify-v5-rc-1-coverpage-jx2rl3
The same logic seems to hold true when using a direct URL with the id which results in targeting the main content (which has the same id on the Coverpage):
https://paulhibbitts.github.io/docsify-v5-rc-1-coverpage/#/?id=docsify-template
Steps to reproduce
- Create Coverpage with H1 (title) such as "Quick start"
- Create a main content Markdown file, with # Quick start as the content title
- View the site, and click on the Coverpage H1 (title) link
Happy to help test/try possible approaches to this issue, thank you!
Environment
Docsify v5 Preview
Additional Information
- Bug still occurs when all/other plugins are disabled?