Skip to content

Commit 64f3a24

Browse files
committed
docs(contributing): styleguide for authoring docs
1 parent 704840c commit 64f3a24

File tree

3 files changed

+159
-0
lines changed

3 files changed

+159
-0
lines changed

docs/CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ Use the following `make` commands and scripts in development:
7575

7676
## Styling
7777

78+
### Documentation
79+
80+
Our style guide for authoring documentation can be found [./contributing/documentation.md](here).
81+
7882
### Backend
7983

8084
#### Use Go style

docs/contributing/documentation.md

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
# Documentation
2+
3+
This style guide is primarily for use with authoring documentation.
4+
5+
6+
## General guidelines
7+
8+
- Use sentence case, even in titles (do not punctuate the title, though)
9+
- Use the second person
10+
- Use the active voice
11+
- Use plural nouns and pronouns (*they*, *their*, or *them*), especially when
12+
the specific number is uncertain (i.e., "Set up your environments" even though
13+
you don't know if the user will have one or many environments)
14+
- When writing documentation titles, use the noun form, not the gerund form (e.g., "Environment
15+
Management" instead of "Managing Environments")
16+
- Context matters when you decide whether to capitalize something or not. For
17+
example, ["A Job creates one or more
18+
Pods..."](https://kubernetes.io/docs/concepts/workloads/controllers/job/) is
19+
correct when writing about Kubernetes. However, in other contexts, neither
20+
*job* nor *pods* would be capitalized. Please follow the conventions set forth
21+
by the relevant companies and open source communities.
22+
23+
## Third-party references
24+
25+
If you have questions that aren't explicitly covered by this guide, consult the
26+
following third-party references:
27+
28+
| **Type of guidance** | **Third-party reference** |
29+
| - | - |
30+
| Spelling | [Merriam-Webster.com](https://www.merriam-webster.com/) |
31+
| Style - nontechnical | [The Chicago Manual of Style](https://www.chicagomanualofstyle.org/home.html) |
32+
| Style - technical | [Microsoft Writing Style Guide](https://docs.microsoft.com/en-us/style-guide/welcome/) |
33+
34+
## Tools
35+
36+
The following are tools that you can use to edit your writing. However, take the
37+
suggestions provided with a grain of salt.
38+
39+
- [alex.js](https://alexjs.com/)
40+
- [Grammarly](https://app.grammarly.com/)
41+
- [Hemingway Editor](https://hemingwayapp.com/)
42+
43+
## How to format text
44+
45+
Below summarizes the text-formatting conventions you should follow.
46+
47+
### Bold
48+
49+
Use **bold** formatting when referring to UI elements.
50+
51+
### Italics
52+
53+
Use *italics* for:
54+
55+
- Parameter names
56+
- Mathematical and version variables
57+
58+
### Code font
59+
60+
Use *code font* for:
61+
62+
- User text input
63+
- Command-line utility names
64+
- DNS record types
65+
- Environment variable names (e.g., `PATH`)
66+
- Filenames, filename extensions, and paths
67+
- Folders and directories
68+
- HTTP verbs, status codes, and content-type values
69+
- Placeholder variables
70+
71+
Use *code blocks* for code samples and other blocks of code. Be sure to indicate
72+
the language your using to apply the proper syntax highlighting.
73+
74+
```text
75+
This is a codeblock.
76+
```
77+
78+
For code that you want users to enter via a command-line interface, use
79+
`console`, not `bash`.
80+
81+
### Punctuation
82+
83+
Do not use the ampersand (&) as a shorthand for *and* unless you're referring to a
84+
UI element or the name of something that uses *&*.
85+
86+
You can use the symbol `~` in place of the word *approximately*.
87+
88+
### UI elements
89+
90+
When referring to UI elements, including the names for buttons, menus, dialogs,
91+
and anything that has a name visible to the user, use bold font.
92+
93+
**Example:** On the **Environment Overview** page, click **Configure SSH**.
94+
95+
Don't use code font for UI elements unless it is rendered based on previously entered
96+
text. For example, if you tell the user to provide the environment name as
97+
`myEnvironment`, then use both bold and cold font when referring to the name.
98+
99+
**Example**: Click **`myEnvironment`**.
100+
101+
When writing out instructions that involve UI elements, both of the following options are acceptable:
102+
103+
- Go to **Manage** > **Users**.
104+
- In the **Manage** menu, click **Users**.
105+
106+
## Product-specific references
107+
108+
Below summarizes the guidelines regarding how Coder terms should be used.
109+
110+
### Capitalized terms
111+
112+
The only Coder-specific terms that should be capitalized are the names of
113+
products (e.g., Coder).
114+
115+
The exception is **code-server**, which is always lowercase. If it appears at the
116+
beginning of the sentence, rewrite the sentence to avoid this usage.
117+
118+
### Uncapitalized terms
119+
120+
In general, we do not capitalize the names of features (unless the situation calls for it,
121+
such as the word appearing at the beginning of a sentence):
122+
123+
- account dormancy
124+
- audit logs
125+
- autostart
126+
- command-line interface
127+
- dev URLs
128+
- environment
129+
- image
130+
- metrics
131+
- organizations
132+
- progressive web app
133+
- registries
134+
- single sign-on
135+
- telemetry
136+
- workspace
137+
- workspace providers
138+
- workspaces as code
139+
140+
We also do not capitalize the names of user roles:
141+
142+
- auditor
143+
- member
144+
- site admin
145+
- site manager
146+
147+
## Standardized spellings
148+
149+
- WiFi
150+

docs/manifest.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,11 @@
237237
"description": "See the code of conduct for contributing to Coder",
238238
"path": "./contributing/CODE_OF_CONDUCT.md"
239239
},
240+
{
241+
"title": "Documentation",
242+
"description": "Our style guide for use when authoring documentation",
243+
"path": "./contributing/documentation.md"
244+
},
240245
{
241246
"title": "Security",
242247
"description": "How to report vulnerabilities in Coder",

0 commit comments

Comments
 (0)