-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
[v14.x-backport] doc: anchor link parity between markdown and html-generated docs #40495
Conversation
PR-URL: nodejs#39635 Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
PR-URL: nodejs#40041 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
Main changes: - Replace current HTML anchor generation to match header anchor generation in Github markdown. - Remove unnecessary double namespacing on generated anchors/links (E.G. `esm.md#loaders` instead of `esm.md#esm_loaders`). - Anchors/links are automatically prefixed with their respective modules when concatenated for usage in `all.html`. Benefits: - All anchor links within and between markdown API docs actually work. - Adding new anchor links no longer requires contributors to generate the HTML docs first to look up the correct anchors. - Anchors are much shorter. - All previous anchor links are preserved by generating hidden legacy anchors. PR-URL: nodejs#39304 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
Note this will conflict with #40479, before merging this PR we should probably make sure that everything that landed on |
#40479 is semver-minor and there is currently no more semver-minor release scheduled for v14.x. I don't think it should block this. |
This didn't make it in time for the maintenance transition -- I'm leaning towards closing this as "won't fix" on v14.x. That may result in merge conflicts when cherry-picking fixes but those should be infrequent now 14 is in maintenance. cc @nodejs/lts |
No problem - if there's anything I can do let me know! |
b5b66ef
to
1f48dd8
Compare
495dde6
to
cede1f2
Compare
30ba86c
to
7f2825b
Compare
@foxxyz Thanks again! Sorry we couldn't merge this in time. |
All good! Hope to contribute more in the future - thank you 🙏🏽 ❗ |
Backport of #39304
(hope this is not too late for a 14.x merge. If it is, feel free to close.)