1 # CHIP Documentation Style Guide
3 CHIP documentation lives here:
5 - **GitHub** — All guides and tutorials across the complete
6 [Project-CHIP organization](https://github.com/project-chip).
9 [CONTRIBUTING.md](https://github.com/project-chip/connectedhomeip/blob/master/CONTRIBUTING.md)
10 for general information on contributing to this project.
14 Place all documentation contributions in the appropriate location in the
15 [`/docs`](../docs) directory. Most contributions should go into the
16 `/docs/guides` subdirectory, which covers conceptual and usage content.
18 Current documentation structure:
20 | Directory | Description |
21 | ----------------------- | -------------------------------------------------------------------------------------------- |
22 | `/actions` | Custom GitHub actions |
23 | `/docs/guides` | Conceptual or usage content that doesn't fit within a subdirectory, and high-level tutorials |
24 | `/docs/guides/images` | All images included in guide content |
25 | `/docs/guides/profiles` | Content describing or illustrating use of CHIP profiles |
26 | `/docs/guides/test` | Content related to testing CHIP |
27 | `/docs/guides/tools` | Content describing or illustrating use of CHIP tools |
28 | `/docs/guides/primer` | CHIP Primer content |
29 | `/docs/presentations` | PDF presentations on CHIP features |
30 | `/docs/specs` | PDFs of CHIP specifications |
31 | `/images` | Top-level CHIP images, such as logos |
33 If you are unsure of the best location for your contribution, create an Issue
34 and ask, or let us know in your Pull Request.
42 For consistency, all document links should point to the content on GitHub.
44 The text of a link should be descriptive, so it's clear what the link is for:
46 > For more information, see the [CHIP Style Guide](./STYLE_GUIDE.md).
48 ## Markdown guidelines
50 Use standard Markdown when authoring CHIP documentation. While HTML may be used
51 for more complex content such as tables, use Markdown as much as possible.
53 > Note: Edit this file to see the Markdown behind the examples.
57 The document title should be an h1 header (#) and in title case (all words are
58 capitalized). All section headers should be h2 (##) or lower and in sentence
59 case (only the first word and proper nouns are capitalized).
61 The best practice for document clarity is to not go lower than h3, but h4 is
62 fine on occasion. Try to avoid using h4 often, or going lower than h4. If this
63 happens, the document should be reorganized or broken up to ensure it stays at
64 h3 with the occasional h4.
66 ### Command line examples
68 Feel free to use either `$` or `%` to preface command line examples, but be
69 consistent within the same doc or set of docs:
72 $ git clone https://github.com/project-chip/connectedhomeip.git
73 % git clone https://github.com/project-chip/connectedhomeip.git
78 If you need use a full terminal prompt with username and hostname, use the
79 format of `root@{hostname}{special-characters}#`.
81 For example, when logged into a Docker container, you might have a prompt like
88 ### Commands and output
90 All example commands and output should be in code blocks with backticks:
96 ...unless the code is within a step list. In a step list, indent the code
101 ### Code blocks in step lists
103 When writing procedures that feature code blocks, indent the content for the
108 $ git clone https://github.com/project-chip/connectedhomeip.git
111 1. Step two, do something else:
115 For clarity in instructions, avoid putting additional step commands after a code
116 sample within a step item. Instead rewrite the instruction so this is not
119 For example, avoid this:
121 1. Step three, do this now:
125 And then you will see that thing.
129 1. Step three, do this now, and you will see that thing:
135 Use backticks for `inline code`. This includes file paths and file or binary
140 Use uppercase `CHIP` in comments, as it is an acronym.
144 | Keyword | Description |
145 | ------- | ----------- |