[v14.x-backport] doc: anchor link parity between markdown and html-generated docs#40495
Closed
foxxyz wants to merge 3 commits intonodejs:v14.x-stagingfrom
Closed
[v14.x-backport] doc: anchor link parity between markdown and html-generated docs#40495foxxyz wants to merge 3 commits intonodejs:v14.x-stagingfrom
foxxyz wants to merge 3 commits intonodejs:v14.x-stagingfrom
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>
Contributor
|
Note this will conflict with #40479, before merging this PR we should probably make sure that everything that landed on |
Member
|
#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. |
Member
|
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 |
Contributor
Author
|
No problem - if there's anything I can do let me know! |
b5b66ef to
1f48dd8
Compare
495dde6 to
cede1f2
Compare
30ba86c to
7f2825b
Compare
Member
|
@foxxyz Thanks again! Sorry we couldn't merge this in time. |
Contributor
Author
|
All good! Hope to contribute more in the future - thank you 🙏🏽 ❗ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #39304
(hope this is not too late for a 14.x merge. If it is, feel free to close.)