Skip to content

Commit 2328e34

Browse files
committed
docs(contributing): styleguide for authoring docs
1 parent a1056bf commit 2328e34

File tree

3 files changed

+158
-0
lines changed

3 files changed

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

docs/manifest.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,11 @@
233233
"description": "See the code of conduct for contributing to Coder",
234234
"path": "./contributing/CODE_OF_CONDUCT.md"
235235
},
236+
{
237+
"title": "Documentation",
238+
"description": "Our style guide for use when authoring documentation",
239+
"path": "./contributing/documentation.md"
240+
},
236241
{
237242
"title": "Security",
238243
"description": "How to report vulnerabilities in Coder",

0 commit comments

Comments
 (0)