Skip to content

Commit 3b8127b

Browse files
authored
docs: add doc style tips to HACKING.md (#556)
This PR adds a few style tips to the Docs section of HACKING.md. I've tried to keep the list short and (hopefully!) memorable
1 parent e4fd6b2 commit 3b8127b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

HACKING.md

+12
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,18 @@ To pull in the latest style and dependencies from the starter pack, clone the [C
226226
- Under the `docs/` folder, run `python3 build_requirements.py`. This generates the latest `requirements.txt` under the `.sphinx/` folder.
227227
- Under the `docs/` folder, run `tox -e docs-dep` to compile a pinned requirements file for tox environments.
228228

229+
### Writing a great doc
230+
231+
- Use short sentences, ideally with one or two clauses.
232+
- Use headings to split the doc into sections. Make sure that the purpose of each section is clear from its heading.
233+
- Avoid a long introduction. Assume that the reader is only going to scan the first paragraph and the headings.
234+
- Avoid background context unless it's essential for the reader to understand.
235+
236+
Recommended tone:
237+
- Use a casual tone, but avoid idioms. Common contractions such as "it's" and "doesn't" are great.
238+
- Use "we" to include the reader in what you're explaining.
239+
- Avoid passive descriptions. If you expect the reader to do something, give a direct instruction.
240+
229241
## Creating a release
230242

231243
To create a new tagged release, go to the [GitHub Releases page](https://github.com/canonical/pebble/releases) and:

0 commit comments

Comments
 (0)