-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
hardhat.org mangles anchor navigation for plugins docs #1800
Comments
This is but a problem with the hardhat.org sure itself, but with the markdown parser of vuepress, which is slightly different than the markdown parser of github.. |
Thanks for the info! I see that https://vuepress.vuejs.org/guide/markdown.html says:
So the problem seems to be that vuepress automatically generates anchors with a different algorithm to GitHub. Looking further, the "Advanced Configuration" section says:
and looking at |
Ahah! I just noticed https://github.com/nomiclabs/hardhat/blob/master/docs/.vuepress/config.js, which configures and VuePress's Config Reference confirms that (It's also worth noting that But I was wrong when I previously wrote:
Of course it doesn't matter what algorithm is used, as long as it is consistent between the generation of the links in the TOC and the generation of the anchor targets for the headers. Looking at the implementation of the default but I was wrong: the problem is not just with the
I've filed vuejs/vuepress#2913 to report this. |
Wow, thanks a lot @aspiers, this is incredibly useful. At some point we are going to stop rendering third-party plugins's readmes on the site, but if I'm understanding correctly this would also affect the core plugins if we add tables of contents to them (and some of them should probably have TOCs) |
Yeah I don't think this is specific to third-party plugins - you're probably right that we'd see the same problem with TOCs on any page within the site's VuePress. |
This issue was marked as stale because it didn't have any activity in the last 30 days. If you think it's still relevant, please leave a comment indicating so. Otherwise, it will be closed in 7 days. |
@aspiers I think this is no longer relevant because we no longer show third-party plugins under (The reason we did this change is to prevent users from thinking that these are official plugins.) |
This is a documentation bug specific to https://hardhat.org/plugins/hardhat-deploy.html - at the top of that plugin's documentation you will see a table of contents. But clicking on many of the items within that TOC will fail to jump to the correct section. For example, click on
2. hardhat node
within the TOC and nothing will happen because the target anchor link doesn't exist.This is not an issue with the hardhat-deploy third-party docs. If you visit their README, you can see the TOC navigation working fine:
https://github.com/wighawag/hardhat-deploy/tree/master
The problem appears to be that hardhat.org is mangling the link targets. For example, the item
2. hardhat node
has the hyperlink:but the link target is actually:
so following the link fails to navigate anywhere.
For comparison, the original README has the correct anchor both in the TOC link and the target section:
The text was updated successfully, but these errors were encountered: