Skip to content

Commit 765cbee

Browse files
authored
Enhance Plone documentation style guide (#1864)
- Clarify why we use one sentence per line - Add links to Microsoft Style Guide for verb tense, usage, and examples. - Add `.vscode/settings.json` reference and example file.
1 parent ec6ffda commit 765cbee

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

docs/_static/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"[markdown]": {
3+
"editor.formatOnSave": false
4+
}
5+
}

docs/contributing/documentation/authors.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,16 +337,32 @@ We follow [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/styl
337337
Key concepts from that guide include the following.
338338

339339
- Documentation should be informational, but friendly.
340-
- Address the reader by using "you" instead of "the user", or by using the collective "we" and "our".
340+
- Address the reader by using "you" and "your" instead of "the user" or "the user's".
341+
- When giving instructions, use the [imperative](https://learn.microsoft.com/en-us/style-guide/grammar/verbs#mood-of-verbs).
342+
- Use the [active voice](https://learn.microsoft.com/en-us/style-guide/grammar/verbs#active-and-passive-voice) whenever possible, avoiding the passive voice.
341343
- Headings should be "Sentence cased", not "Title Cased".
342344

343345
The Plone Documentation Team adopted additional guidelines.
344346

345347
- Use one sentence per line.
346348
Keep sentences short and understandable.
347-
This will greatly improve the editing and maintenance of your documentation.
348-
- Do not follow the PEP8 maximum line length standard.
349-
Documentation is narrative text and images, not Python code.
349+
350+
Never break a single sentence across multiple lines.
351+
Documentation is narrative text and images, not code.
352+
Do not follow the PEP8 maximum line length standard.
353+
Similarly, never use English semantic line breaks.
354+
English semantic rules are difficult to understand and enforce.
355+
356+
Not following this guidance makes pull request reviews needlessly difficult, often resulting in noisy diffs.
357+
The reviewer can't give targeted feedback for a single sentence when there are multiple sentences on one line.
358+
When a single sentence is broken across multiple lines, the reviewer has to submit one suggestion per line.
359+
Most reviewers won't do that, and instead make a comment instead of a suggestion.
360+
This in turn deprives you of the easy option to commit the suggestion to the pull request by a single click of a button in the GitHub user interface.
361+
362+
Following this guidance will greatly improve the editing and maintenance of your documentation.
363+
364+
- Have the file [`.vscode/settings.json`](/_static/settings.json) in the root of your project to prevent VSCode from reformatting files with the `.md` extension.
365+
350366
- Use dashes `-` in filenames and avoid underscores.
351367
- Images should be no wider than 740 pixels to fit within the documentation's main view port.
352368
This avoids scaling and reducing legibility of images.

0 commit comments

Comments
 (0)