Skip to content

Commit 0ea2fcd

Browse files
authored
chore(README): update links, add examples
1 parent c73cdef commit 0ea2fcd

File tree

1 file changed

+43
-4
lines changed

1 file changed

+43
-4
lines changed

README.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
<a title="MIT License" href="LICENSE">
1717
<img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License" />
1818
</a>
19-
<a href="https://codecov.io/gh/nodejs/api-docs-tooling" >
20-
<img src="https://codecov.io/gh/nodejs/api-docs-tooling/graph/badge.svg?token=TZRUKKDICU" alt="Codecov coverage badge"/>
19+
<a href="https://codecov.io/gh/nodejs/doc-kit" >
20+
<img src="https://codecov.io/gh/nodejs/doc-kit/graph/badge.svg?token=TZRUKKDICU" alt="Codecov coverage badge"/>
2121
</a>
22-
<a title="scorecard" href="https://securityscorecards.dev/viewer/?uri=github.com/nodejs/api-docs-tooling">
23-
<img src="https://api.securityscorecards.dev/projects/github.com/nodejs/api-docs-tooling/badge" alt="api-docs-tooling scorecard badge" />
22+
<a title="scorecard" href="https://securityscorecards.dev/viewer/?uri=github.com/nodejs/doc-kit">
23+
<img src="https://api.securityscorecards.dev/projects/github.com/nodejs/doc-kit/badge" alt="doc-kit scorecard badge" />
2424
</a>
2525
<a href="https://www.bestpractices.dev/projects/29">
2626
<img src="https://www.bestpractices.dev/projects/29/badge" alt="CII Best Practices badge">
@@ -35,6 +35,10 @@ Local invocation:
3535
$ npx doc-kit --help
3636
```
3737

38+
```sh
39+
$ node bin/cli.mjs --help
40+
```
41+
3842
```
3943
Usage: @nodejs/doc-kit [options] [command]
4044
@@ -78,3 +82,38 @@ Launch guided CLI wizard
7882
Options:
7983
-h, --help display help for command
8084
```
85+
86+
## Examples
87+
88+
### Legacy
89+
90+
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.
91+
92+
```sh
93+
npx doc-kit generate \
94+
-t legacy-html \
95+
-t legacy-json \
96+
-i "path/to/node/doc/api/*.md" \
97+
-o out \
98+
--index path/to/node/doc/api/index.md
99+
```
100+
101+
### Redesigned
102+
103+
To generate [our redesigned documentation pages](https://nodejs-api-doc-tooling.vercel.app), use the `web` and `orama-db` (for search) generators.
104+
105+
```sh
106+
npx doc-kit generate \
107+
-t web \
108+
-t orama-db \
109+
-i "path/to/node/doc/api/*.md" \
110+
-o out \
111+
--index path/to/node/doc/api/index.md
112+
```
113+
114+
> [!TIP]
115+
> In order to use the search functionality, you _must_ serve the output directory.
116+
>
117+
> ```sh
118+
> npx serve out
119+
> ```

0 commit comments

Comments
 (0)