Skip to content

Commit a9629eb

Browse files
committed
Add basic style guide
1 parent 55247f4 commit a9629eb

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

STYLE.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Style Guide
2+
3+
This guide contains general guidelines for how to format and present documentation in this repository.
4+
They should be followed for most cases, but as a guideline it can be broken, _with good reason_.
5+
6+
The documentation is written using [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/).
7+
8+
## General Formatting
9+
10+
- Format paragraphs with one sentence per line for easier diffs.
11+
- Leave a space before and after headings.
12+
13+
## Headings are Written in Title Case
14+
15+
Use [title case](https://en.wikipedia.org/wiki/Letter_case#Title_case) for headings, meaning all words are capitalized except for minor words.
16+
17+
## Avoid Nesting Headings too Deep
18+
19+
Nesting headings up to three levels is generally ok.
20+
21+
## Unordered and Ordered Lists
22+
23+
Write lists as proper sentences.
24+
Separate the items simply with commas if each item is simple, or make each item a full sentence if the items are longer and contain multiple sentences.
25+
26+
1. The first item can look like this,
27+
2. The second like this, and
28+
3. The third item like this.
29+
30+
## Using Admonitions
31+
32+
Aim to include examples, notes, warnings using [admonitions](https://squidfunk.github.io/mkdocs-material/reference/admonitions/) whenever appropriate.
33+
They stand out better from the main text, and can be collapsed by default if needed.
34+
35+
!!! example "Example one"
36+
This is an example.
37+
The title of the example uses [sentence case](https://en.wikipedia.org/wiki/Letter_case#Sentence_case).
38+
39+
??? note "Collapsed note"
40+
This note is collapsed, because it uses `???`.
41+
42+
[](){#ref-style-references}
43+
## References
44+
45+
Add references to headings to allow easier cross-referencing from other sections.
46+
Prefix the reference name with `ref-`, followed by at least one level of identifier for the page itself.
47+
Finally, add an identifier for the heading itself.
48+
[This section][ref-style-references] uses the identifier `ref-style-references`.

0 commit comments

Comments
 (0)