diff options
author | foxxyz <foxxyz@gmail.com> | 2021-07-05 06:39:17 +0300 |
---|---|---|
committer | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2021-08-30 01:40:20 +0300 |
commit | 6fdd5827f0956ffc4e7ffe31babaf530e42f75b9 (patch) | |
tree | 1e0ccc64f99d288e3ed80119c53a1aac1c33348e /doc/api/corepack.md | |
parent | b6b638bdd69e4bd07140497c026cdf0aba8dd544 (diff) |
doc: anchor link parity between markdown and html-generated docs
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: https://github.com/nodejs/node/pull/39304
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Diffstat (limited to 'doc/api/corepack.md')
-rw-r--r-- | doc/api/corepack.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/api/corepack.md b/doc/api/corepack.md index 1e30256b491..76de9e9fe98 100644 --- a/doc/api/corepack.md +++ b/doc/api/corepack.md @@ -108,12 +108,12 @@ that happen, run [`corepack enable`][] again to add them back). [Corepack documentation]: https://github.com/nodejs/corepack#readme [Corepack repository]: https://github.com/nodejs/corepack [Yarn]: https://yarnpkg.com -[`"packageManager"`]: packages.md#packages_packagemanager +[`"packageManager"`]: packages.md#packagemanager [`corepack disable`]: https://github.com/nodejs/corepack#corepack-disable--name [`corepack enable`]: https://github.com/nodejs/corepack#corepack-enable--name [`corepack prepare`]: https://github.com/nodejs/corepack#corepack-prepare--nameversion -[`package.json`]: packages.md#packages_node_js_package_json_field_definitions +[`package.json`]: packages.md#nodejs-packagejson-field-definitions [pnpm]: https://pnpm.js.org -[supported binaries]: #corepack_supported_package_managers -[supported package manager]: #corepack_supported_package_managers +[supported binaries]: #supported-package-managers +[supported package manager]: #supported-package-managers [various flags]: https://github.com/nodejs/corepack#utility-commands |