GeezerVison is showing github.com — doc: add new writing-docs contributing md · nodejs/node@273607e
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboard +38Lines changed: 38 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +# How to write documentation for the Node.js project |
| 2 | + |
| 3 | +This document refers to the Node.js API documentation that gets deployed to [nodejs.org/en/doc][] |
| 4 | +and consists in a general reference on how to write and update such documentation. |
| 5 | + |
| 6 | +## Style Guide |
| 7 | + |
| 8 | +For a style guide on how to write or update the Node.js documentation refer to the [doc/README][] document. |
| 9 | + |
| 10 | +## Building |
| 11 | + |
| 12 | +There are a few different commands that you can use to build and view the documentation locally, |
| 13 | +the simplest one being: |
| 14 | + |
| 15 | +```bash |
| 16 | +make docserve |
| 17 | +``` |
| 18 | + |
| 19 | +This command builds the documentation, spins up a local server and provides you with a URL to |
| 20 | +it that you can navigate to in order to view the built documentation. |
| 21 | + |
| 22 | +For more build options refer to the [documentation building][building-the-documentation] documentation. |
| 23 | + |
| 24 | +And for more details about the tooling used to build the documentation refer to |
| 25 | +the [API Documentation Tooling][] document. |
| 26 | + |
| 27 | +## Linting and Formatting |
| 28 | + |
| 29 | +To make sure that your changes pass linting run the following command: |
| 30 | + |
| 31 | +```bash |
| 32 | +make lint-md |
| 33 | +``` |
| 34 | + |
| 35 | +[API Documentation Tooling]: ./api-documentation.md |
| 36 | +[building-the-documentation]: ../../BUILDING.md#building-the-documentation |
| 37 | +[doc/README]: ../../doc/README.md |
| 38 | +[nodejs.org/en/doc]: https://nodejs.org/en/docs/ |