The generators for Node.js's legacy documentation formats: the classic HTML pages and JSON files of the Node.js API docs, as Node.js's original documentation tooling wrote them, with the same templates, anchors and file names. They exist for Node.js and the tools that read those files.
Other projects don't need them: build a site with the website generator, and API data with JSON.
npm install --save-dev @doc-kit/cli @node-core/doc-kit-legacy
The CLI loads each target name from this package: legacy-html loads
@node-core/doc-kit-legacy/legacy-html.
| Target | Output |
|---|---|
legacy-html | A classic HTML page per source file, such as fs.html, and its assets/ |
legacy-html-all | all.html, every page one after another |
legacy-json | A classic JSON file per source file, such as fs.json, with HTML in desc |
legacy-json-all | all.json, the sections of every JSON file merged |
legacy-html-all and legacy-json-all run legacy-html and legacy-json
first.
npx @doc-kit/cli generate -t legacy-html -t legacy-json -i "doc/api/*.md" -o out
The HTML pages build their source and edit links from repository, and the
version picker's links from baseURL, which have no flags. Set them under
global in your configuration file (nodejs/node and
https://nodejs.org/docs), or extend the
Node.js preset, which sets both,
along with changelog.