You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contributing/authors.md
+81-43Lines changed: 81 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,46 +9,22 @@ myst:
9
9
10
10
(authors-guide-label)=
11
11
12
-
# Authors Guide
12
+
# Authors guide
13
13
14
14
This guide is for authors of Plone Documentation.
15
-
It covers configuring quality checks and syntax for writing markup that is of particular interest to authors.
16
-
For general markup syntax, see {doc}`writing-docs-guide`.
15
+
It covers how to run a live preview of documentation while editing, build documentation, and perform quality checks.
16
+
For general markup syntax, see {doc}`myst-reference`.
17
17
18
18
19
-
(authors-html-meta-data-label)=
20
-
21
-
## HTML and Open Graph Metadata
22
-
23
-
All documents must have a `myst` topmatter key with an `html_meta` directive at the top of every page.
24
-
When rendered to HTML, it inserts `<meta>` tags for improved search engine results and nicer social media posts.
25
-
Authors should include at least `description`, `property=og:description`, `property=og:title`, and `keywords` meta tags.
26
-
27
-
The following is an example of `html_meta`.
28
-
Note that the content of the two tags `description` and `property=og:description` should be identical.
29
-
30
-
```md
31
-
---
32
-
myst:
33
-
html_meta:
34
-
"description": "Authors' guide to writing Plone Documentation. It covers configuring quality checks and syntax for writing markup that is of particular interest to authors."
35
-
"property=og:description": "Authors' guide to writing Plone Documentation. It covers configuring quality checks and syntax for writing markup that is of particular interest to authors."
This renders in the HTML `<head>` section as follows.
21
+
Use `sphinx-autobuild` to view changes in the browser while you edit documentation.
42
22
43
-
```html
44
-
<metacontent="Authors' guide to writing Plone Documentation. It covers configuring quality checks and syntax for writing markup that is of particular interest to authors."name="description" />
45
-
<metacontent="Authors' guide to writing Plone Documentation. It covers configuring quality checks and syntax for writing markup that is of particular interest to authors."property="og:description" />
Additional {term}`Open Graph` metadata is implemented through the Sphinx extension [`sphinxext-opengraph`](https://github.com/wpilibsuite/sphinxext-opengraph) and the [MyST `html_meta` directive](https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#setting-html-metadata), which resolves to the [Docutils `meta` directive](https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata).
51
-
See the site-wide configuration in {file}`conf.py`.
27
+
You can open a browser at http://127.0.0.1:8000/ to preview the documentation.
52
28
53
29
54
30
(authors-quality-checks-label)=
@@ -62,7 +38,7 @@ We strive for high quality documentation, setting the following minimum standard
62
38
63
39
### Markup syntax must be valid
64
40
65
-
See both the specific markup syntax above and general markup in {doc}`writing-docs-guide`.
41
+
See both the specific markup syntax above and general markup in {doc}`myst-reference`.
66
42
67
43
To validate markup, run the following command.
68
44
@@ -75,7 +51,7 @@ Open `/_build/html/index.html` in a web browser.
75
51
76
52
(authors-english-label)=
77
53
78
-
### American English Spelling, Grammar, and Syntax, and Style Guide
54
+
### American English spelling, grammar, and syntax, and style guide
79
55
80
56
Spellings are enforced through [`Vale`](https://vale.sh/).
81
57
Plone uses American English.
@@ -85,17 +61,18 @@ Spelling is configured in {file}`Makefile`, {file}`.vale.ini`, and in files in `
85
61
Authors should add new words and proper names using correct casing to {file}`styles/Vocab/Plone/accept.txt`, sorted alphabetically and case-insensitive.
86
62
87
63
Vale also provides English grammar and syntax checking, as well as a Style Guide.
64
+
We follow the [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/).
88
65
89
66
To perform all these checks, run the following command.
90
67
91
68
```shell
92
69
make vale
93
70
```
94
71
95
-
Because it is difficult to automate good English grammar and syntax, we do not strictly enforce it.
72
+
Because it is difficult to automate good American English grammar and syntax, we do not strictly enforce it.
96
73
We also understand that contributors might not be fluent in English.
97
-
We encourage contributors to make a reasonable effort, and to seek help from community members who are fluent in English.
98
-
When you submit a pull request, please select a Reviewer to review your work.
74
+
We encourage contributors to make a reasonable effort, and to request a review of their pull request from community members who are fluent in English to fix grammar and syntax.
75
+
Please ask!
99
76
100
77
101
78
(authors-linkcheck-label)=
@@ -188,7 +165,7 @@ If no other lexer works well, then fall back to `text`.
188
165
At least then the build will succeed without warnings, although syntax highlighting for such snippets will not appear.
189
166
190
167
191
-
#### Validate the Lexer
168
+
#### Validate the lexer
192
169
193
170
Always build the page to validate syntax.
194
171
The change should not be merged if there are any Sphinx warnings.
@@ -220,12 +197,73 @@ When using the online lexer, if any red-bordered rectangles appear, then the lex
220
197
You can search the [Pygments issue tracker](https://github.com/pygments/pygments/search) for possible solutions, or submit a pull request to enhance the lexer.
221
198
222
199
223
-
## Synchronize the Browser While Editing
200
+
(authors-html-meta-data-label)=
224
201
225
-
Use `sphinx-autobuild` to view changes in the browser while editing documentation.
202
+
### HTML and Open Graph metadata
226
203
227
-
```shell
228
-
make livehtml
204
+
All documents must have a `myst` topmatter key with an `html_meta` directive at the top of every page.
205
+
When rendered to HTML, it inserts `<meta>` tags for improved search engine results and nicer social media posts.
206
+
Authors should include at least `description`, `property=og:description`, `property=og:title`, and `keywords` meta tags.
207
+
208
+
The following is an example of `html_meta`.
209
+
Note that the content of the two tags `description` and `property=og:description` should be identical.
210
+
211
+
```md
212
+
---
213
+
myst:
214
+
html_meta:
215
+
"description": "Authors' guide to writing Plone Documentation. It covers configuring quality checks and syntax for writing markup that is of particular interest to authors."
216
+
"property=og:description": "Authors' guide to writing Plone Documentation. It covers configuring quality checks and syntax for writing markup that is of particular interest to authors."
You can open a browser at http://127.0.0.1:8000/ to preview the documentation.
222
+
This renders in the HTML `<head>` section as follows.
223
+
224
+
```html
225
+
<metacontent="Authors' guide to writing Plone Documentation. It covers configuring quality checks and syntax for writing markup that is of particular interest to authors."name="description" />
226
+
<metacontent="Authors' guide to writing Plone Documentation. It covers configuring quality checks and syntax for writing markup that is of particular interest to authors."property="og:description" />
Additional {term}`Open Graph` metadata is implemented through the Sphinx extension [`sphinxext-opengraph`](https://github.com/wpilibsuite/sphinxext-opengraph) and the [MyST `html_meta` directive](https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#setting-html-metadata), which resolves to the [Docutils `meta` directive](https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata).
232
+
See the site-wide configuration in {file}`conf.py`.
233
+
234
+
235
+
## Plone documentation styleguide
236
+
237
+
We follow [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/).
238
+
239
+
Key concepts from that guide include the following.
240
+
241
+
- Documentation should be informational, but friendly.
242
+
- Address the reader by using "you" instead of "the user".
243
+
- Headings should be Sentence cased, not Title Cased.
244
+
245
+
The Plone Documentation Team adopted additional guidelines.
246
+
247
+
- Use one sentence per line.
248
+
Keep sentences short and understandable.
249
+
This will greatly improve the editing and maintenance of your documentation.
250
+
251
+
- Do not follow PEP8 maximum line length standard.
252
+
Documentation is narrative text and images, not Python code.
253
+
254
+
- Use dashes `-` in filenames and avoid underscores.
255
+
256
+
- Images should be no wider than 740 pixels to fit within the documentation's main view port.
257
+
This avoids scaling and reducing legibility of images.
258
+
To make that work in Volto, set your browser width to 1180 pixels.
259
+
You will notice that the drag and trash icons for each block move inside the block from outside.
260
+
261
+
- In user documentation, provide screenshots of each step where the interface changes.
262
+
It is painstaking, but worth the effort.
263
+
Provide sufficient detail of what each option is and does.
264
+
265
+
266
+
## General documentation writing references
267
+
268
+
-[Write the Docs - Documentation Guide](https://www.writethedocs.org/guide/)
269
+
-[A Guide to Em Dashes, En Dashes, and Hyphens](https://www.merriam-webster.com/words-at-play/em-dash-en-dash-how-to-use)
0 commit comments