Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 43 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
<a title="MIT License" href="LICENSE">
<img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License" />
</a>
<a href="https://codecov.io/gh/nodejs/api-docs-tooling" >
<img src="https://codecov.io/gh/nodejs/api-docs-tooling/graph/badge.svg?token=TZRUKKDICU" alt="Codecov coverage badge"/>
<a href="https://codecov.io/gh/nodejs/doc-kit" >
<img src="https://codecov.io/gh/nodejs/doc-kit/graph/badge.svg?token=TZRUKKDICU" alt="Codecov coverage badge"/>
</a>
<a title="scorecard" href="https://securityscorecards.dev/viewer/?uri=github.com/nodejs/api-docs-tooling">
<img src="https://api.securityscorecards.dev/projects/github.com/nodejs/api-docs-tooling/badge" alt="api-docs-tooling scorecard badge" />
<a title="scorecard" href="https://securityscorecards.dev/viewer/?uri=github.com/nodejs/doc-kit">
<img src="https://api.securityscorecards.dev/projects/github.com/nodejs/doc-kit/badge" alt="doc-kit scorecard badge" />
</a>
<a href="https://www.bestpractices.dev/projects/29">
<img src="https://www.bestpractices.dev/projects/29/badge" alt="CII Best Practices badge">
Expand All @@ -35,6 +35,10 @@ Local invocation:
$ npx doc-kit --help
```

```sh
$ node bin/cli.mjs --help
```

```
Usage: @nodejs/doc-kit [options] [command]

Expand Down Expand Up @@ -78,3 +82,38 @@ Launch guided CLI wizard
Options:
-h, --help display help for command
```

## Examples

### Legacy

To generate a 1:1 match with the [legacy tooling](https://github.com/nodejs/node/tree/main/tools/doc), use the `legacy-html`, `legacy-json`, `legacy-html-all`, and `legacy-json-all` generators.

```sh
npx doc-kit generate \
-t legacy-html \
-t legacy-json \
-i "path/to/node/doc/api/*.md" \
-o out \
--index path/to/node/doc/api/index.md
```

### Redesigned

To generate [our redesigned documentation pages](https://nodejs-api-doc-tooling.vercel.app), use the `web` and `orama-db` (for search) generators.

```sh
npx doc-kit generate \
-t web \
-t orama-db \
-i "path/to/node/doc/api/*.md" \
-o out \
--index path/to/node/doc/api/index.md
```

> [!TIP]
> In order to use the search functionality, you _must_ serve the output directory.
>
> ```sh
> npx serve out
> ```
Loading