Skip to content

Commit 1209b83

Browse files
Fix communuty/contributing
1 parent f807c76 commit 1209b83

6 files changed

Lines changed: 6 additions & 257 deletions

File tree

70.6 KB
Loading

docs/_static/standards.png

23.7 KB
Loading
437 KB
Binary file not shown.

docs/_static/voting_flowchart.png

35.7 KB
Loading

docs/community/contributing.md

Lines changed: 6 additions & 255 deletions
Original file line numberDiff line numberDiff line change
@@ -281,117 +281,16 @@ If no other lexer works well, then fall back to `text`.
281281
At least then the build will succeed without warnings, although syntax highlighting for such snippets will not appear.
282282

283283

284-
#### Validate the lexer
285-
286-
Always build the page to validate syntax.
287-
The change should not be merged if there are any Sphinx warnings.
288-
The Sphinx console will display any warnings, such as the following.
289-
290-
```console
291-
/OpenSPP/documentation/classic-ui/bodyclasses.md:10: WARNING: Could not lex literal_block as "python". Highlighting skipped.
292-
```
293-
294-
The above warning indicates that the syntax is not valid.
295-
Common mistakes include:
296-
297-
- Using `...` or `` to indicate omitted code.
298-
It is preferable to never use ellipses.
299-
If you must do that, comment it out using the language's comment syntax.
300-
- Using comments in JSON.
301-
- A previous code block bleeds through to the next due to invalid MyST syntax.
302-
303-
To validate code block syntax, run the following command.
304-
305-
```shell
306-
make html
307-
```
308-
309-
An [online demo of all lexers that Pygments supports](https://pygments.org/demo/) may be helpful to test out your code blocks and snippets for syntax highlighting.
310-
You can also use the [`pygmentize`](https://pygments.org/docs/cmdline/) binary.
311-
312-
When using the online lexer, if any red-bordered rectangles appear, then the lexer for Pygments interprets your snippet as not valid.
313-
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.
314-
315-
316-
### HTML and Open Graph metadata
317-
318-
All documents must have a `myst` topmatter key with an `html_meta` directive at the top of every page.
319-
When rendered to HTML, it inserts `<meta>` tags for improved search engine results and nicer social media posts.
320-
Authors should include at least `description`, `property=og:description`, `property=og:title`, and `keywords` meta tags.
321-
322-
The following is an example of `html_meta`.
323-
Note that the content of the two tags `description` and `property=og:description` should be identical.
324-
325-
```md
326-
---
327-
myst:
328-
html_meta:
329-
"description": "Authors' guide to writing OpenSPP Documentation. It covers configuring quality checks and syntax for writing markup that is of particular interest to authors."
330-
"property=og:description": "Authors' guide to writing OpenSPP Documentation. It covers configuring quality checks and syntax for writing markup that is of particular interest to authors."
331-
"property=og:title": "Authors Guide"
332-
"keywords": "OpenSPP, Documentation, SEO, meta, Vale, spell, grammar, style, check, linkcheck, lexer"
333-
---
334-
```
335-
336-
This renders in the HTML `<head>` section as follows.
337-
338-
```html
339-
<meta content="Authors' guide to writing OpenSPP Documentation. It covers configuring quality checks and syntax for writing markup that is of particular interest to authors." name="description" />
340-
<meta content="Authors' guide to writing OpenSPP Documentation. It covers configuring quality checks and syntax for writing markup that is of particular interest to authors." property="og:description" />
341-
<meta content="Authors Guide" property="og:title" />
342-
<meta content="OpenSPP, Documentation, SEO, meta, Vale, spell, grammar, style, check, linkcheck, lexer" name="keywords" />
343-
```
344-
345-
Additional 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/configuration.html#setting-html-metadata), which resolves to the [Docutils `meta` directive](https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata).
346-
See the site-wide configuration in {file}`conf.py`.
347-
348-
349-
## OpenSPP documentation styleguide
350-
351-
We follow [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/).
352-
353-
Key concepts from that guide include the following.
354-
355-
- Documentation should be informational, but friendly.
356-
- Address the reader by using "you" instead of "the user".
357-
- Headings should be Sentence cased, not Title Cased.
358-
359-
The OpenSPP Documentation Team adopted additional guidelines.
360-
361-
- Use one sentence per line.
362-
Keep sentences short and understandable.
363-
This will greatly improve the editing and maintenance of your documentation.
364-
365-
- Do not follow PEP8 maximum line length standard.
366-
Documentation is narrative text and images, not Python code.
367-
368-
- Use dashes `-` in filenames and avoid underscores.
369-
370-
- Images should be no wider than 740 pixels to fit within the documentation's main view port.
371-
This avoids scaling and reducing legibility of images.
372-
To make that work in Volto, set your browser width to 1180 pixels.
373-
You will notice that the drag and trash icons for each block move inside the block from outside.
374-
375-
- In user documentation, provide screenshots of each step where the interface changes.
376-
It is painstaking, but worth the effort.
377-
Provide sufficient detail of what each option is and does.
378-
379-
380-
## General documentation writing references
381-
382-
- [Write the Docs - Documentation Guide](https://www.writethedocs.org/guide/)
383-
- [A Guide to Em Dashes, En Dashes, and Hyphens](https://www.merriam-webster.com/words-at-play/em-dash-en-dash-how-to-use)
384-
385284
## Documentation quality requirements
386285

387286
We use GitHub Actions with every pull request to enforce OpenSPP Documentation quality.
388287
We recommend that you build the documentation locally to catch errors and warnings early on.
389288

390-
# MyST reference
289+
### MyST reference
391290

392-
This chapter provides information and examples for how to write proper MyST syntax—with references to Sphinx extensions for their specific directives—in OpenSPP Documentation.
291+
This section provides information and examples for how to write proper MyST syntax—with references to Sphinx extensions for their specific directives—in OpenSPP Documentation.
393292

394-
## MyST, reStructuredText, and Markdown
293+
### MyST, reStructuredText, and Markdown
395294

396295
We use [MyST, or Markedly Structured Text](https://myst-parser.readthedocs.io/en/latest/), a rich and extensible flavor of Markdown, for authoring training documentation.
397296

@@ -402,7 +301,7 @@ MyST may be more familiar to reStructuredText authors.
402301
MyST allows the use of a fence and `{rst-eval}` to evaluate native reStructuredText.
403302
This may be useful when Markdown does not provide sufficient flexibility, such as for `figure`.
404303

405-
## MyST syntax reference
304+
#### MyST syntax reference
406305

407306
The following are frequently used snippets and examples.
408307

@@ -414,7 +313,7 @@ Official MyST documentation
414313
- [MyST Syntax Reference](https://myst-parser.readthedocs.io/en/latest/syntax/reference.html)
415314
```
416315

417-
### Cross-references
316+
#### Cross-references
418317

419318
```{seealso}
420319
[The MyST Syntax Guide > Cross-references](https://myst-parser.readthedocs.io/en/latest/syntax/cross-referencing.html)
@@ -492,8 +391,6 @@ The main content area of a page in the documentation is 743 pixels wide.
492391
When taking screenshots or videos, resize your browser window, or try to limit the width of your media to 740 pixels.
493392
This will preserve legibility of images.
494393

495-
(enhance-images-label)=
496-
497394
#### Enhance images
498395

499396
We use cards from the Sphinx extension [`sphinx-design`](https://sphinx-design.readthedocs.io/en/latest/cards.html) to enhance the display and functionality of images.
@@ -540,7 +437,7 @@ The following MyST example will display as shown below.
540437
```
541438
````
542439

543-
```{image} ../_static/standards.png
440+
```{image} /_static/standards.png
544441
:alt: XKCD "Standards" comic strip
545442
```
546443

@@ -626,11 +523,6 @@ Example MyST syntax is shown below.
626523

627524
Note that the path must be absolute to support both submodules and the main documentation.
628525
Don't use file-relative paths.
629-
The above MyST markup renders as shown below.
630-
631-
```{video} /_static/user-manual/blocks/block-copy-cut.mp4
632-
:width: 100%
633-
```
634526

635527
### Diagrams and graphs with Graphviz
636528

@@ -765,147 +657,6 @@ print(f"my {a}nd line")
765657
```
766658
````
767659

768-
769-
# Building and checking the quality of documentation
770-
771-
This document covers how to build the OpenSPP Documentation and check it for quality.
772-
773-
774-
## Installation
775-
776-
Installation of OpenSPP Documentation includes pre-requisites and the repository itself.
777-
778-
779-
### Python
780-
781-
Python 3.8 or later is required.
782-
A more recent Python is preferred.
783-
Use your system's package manager or [pyenv](https://github.com/pyenv/pyenv) to install an appropriate version of Python.
784-
785-
786-
### Vale
787-
788-
Vale is a linter for narrative text.
789-
It checks spelling, English grammar, and style guides.
790-
OpenSPP documentation uses a custom spelling dictionary, with accepted and rejected spellings in `styles/Vocab/OpenSPP`.
791-
792-
Use your operating system's package manager to [install Vale](https://vale.sh/docs/vale-cli/installation/).
793-
794-
Vale also has [integrations](https://vale.sh/docs/integrations/guide/) with various IDEs.
795-
796-
- [JetBrains](https://vale.sh/docs/integrations/jetbrains/)
797-
- [Vim](https://github.com/dense-analysis/ale)
798-
- [VS Code](https://github.com/errata-ai/vale-vscode)
799-
800-
OpenSPP documentation uses a file located at the root of the repository, `.vale.ini`, to configure Vale.
801-
This file allows overriding rules or changing their severity.
802-
803-
The OpenSPP Documentation Team selected the [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/) for its ease of use—especially for non-native English readers and writers—and attention to non-technical audiences.
804-
805-
```{note}
806-
More corrections to spellings and Vale's configuration are welcome by submitting a pull request.
807-
This is an easy way to become a contributor to OpenSPP.
808-
```
809-
810-
811-
### Graphviz
812-
813-
Install [Graphviz](https://graphviz.org/download/) for graph visualization.
814-
815-
`````{tab-set}
816-
````{tab-item} macOS
817-
```shell
818-
brew install graphviz
819-
```
820-
````
821-
822-
````{tab-item} Ubuntu
823-
```shell
824-
sudo apt-get install graphviz
825-
```
826-
````
827-
`````
828-
829-
830-
### Clone `OpenSPP/documentation`
831-
832-
Clone the OpenSPP Documentation repository, and change your working directory into the cloned project.
833-
Then with a single command using `Makefile`, create a Python virtual environment, install project dependencies, pull in Volto documentation as a git submodule, build the docs, and view the results in a web browser by opening `/_build/html/index.html`.
834-
835-
```shell
836-
git clone https://github.com/OpenSPP/documentation.git
837-
cd documentation
838-
make html
839-
```
840-
841-
## Available documentation builds
842-
843-
All build and check documentation commands use the file `Makefile`.
844-
845-
To see the most frequently used builds, use the following command.
846-
847-
```shell
848-
make help
849-
```
850-
851-
Else you can open `Makefile` to see other build formats, including PDF.
852-
853-
854-
### `html`
855-
856-
`html` is the HTML version of the documentation.
857-
858-
```shell
859-
make html
860-
```
861-
862-
Open `/_build/html/index.html` in a web browser.
863-
864-
865-
### `livehtml`
866-
867-
`livehtml` rebuilds Sphinx documentation on changes, with live-reload in the browser.
868-
869-
```shell
870-
make livehtml
871-
```
872-
873-
Open http://127.0.0.1:8050/ in a web browser.
874-
875-
876-
### `linkcheck`
877-
878-
`linkcheck` checks all links.
879-
See {ref}`authors-linkcheck-label` for configuration.
880-
881-
```shell
882-
make linkcheck
883-
```
884-
885-
Open `/_build/linkcheck/output.txt` for a list of broken links.
886-
887-
888-
### `vale`
889-
890-
`vale` checks for American English spelling, grammar, syntax, and the Microsoft Developer Style Guide.
891-
See {ref}`authors-english-label` for configuration.
892-
893-
```shell
894-
make vale
895-
```
896-
897-
See the output on the console for suggestions.
898-
899-
900-
### `html_meta`
901-
902-
`html_meta` adds a meta data section to each chapter if missing.
903-
See {ref}`authors-html-meta-data-label` for more info.
904-
905-
```shell
906-
make html_meta
907-
```
908-
909660
# Sphinx extensions
910661

911662
We use several Sphinx extensions to enhance the presentation of OpenSPP documentation.

docs/reference/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ This section provides detailed reference material about OpenSPP components.
1111

1212
- {doc}`modules/index`
1313
- {doc}`technical/index`
14-
- {doc}`glossary`
1514

1615
```{toctree}
1716
:maxdepth: 2
@@ -20,5 +19,4 @@ This section provides detailed reference material about OpenSPP components.
2019
2120
modules/index
2221
technical/index
23-
glossary
2422
```

0 commit comments

Comments
 (0)