Skip to content

Commit d04f7a8

Browse files
committed
Move style guide to contributing section
1 parent a9629eb commit d04f7a8

File tree

2 files changed

+47
-48
lines changed

2 files changed

+47
-48
lines changed

STYLE.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

docs/contributing/index.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,50 @@ Once your changes are ready, click on the "Commit changes..." button in the top
9292

9393
* if the change is small and you are CSCS staff, you can merge the PR immediately
9494
* all other changes can be
95+
96+
## Style Guide
97+
98+
This section contains general guidelines for how to format and present documentation in this repository.
99+
They should be followed for most cases, but as a guideline it can be broken, _with good reason_.
100+
101+
### General Formatting
102+
103+
- Format paragraphs with one sentence per line for easier diffs.
104+
- Leave a space before and after headings.
105+
106+
### Headings are Written in Title Case
107+
108+
Use [title case](https://en.wikipedia.org/wiki/Letter_case#Title_case) for headings, meaning all words are capitalized except for minor words.
109+
110+
### Avoid Nesting Headings too Deep
111+
112+
Nesting headings up to three levels is generally ok.
113+
114+
### Unordered and Ordered Lists
115+
116+
Write lists as proper sentences.
117+
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.
118+
119+
1. The first item can look like this,
120+
2. The second like this, and
121+
3. The third item like this.
122+
123+
### Using Admonitions
124+
125+
Aim to include examples, notes, warnings using [admonitions](https://squidfunk.github.io/mkdocs-material/reference/admonitions/) whenever appropriate.
126+
They stand out better from the main text, and can be collapsed by default if needed.
127+
128+
!!! example "Example one"
129+
This is an example.
130+
The title of the example uses [sentence case](https://en.wikipedia.org/wiki/Letter_case#Sentence_case).
131+
132+
??? note "Collapsed note"
133+
This note is collapsed, because it uses `???`.
134+
135+
[](){#ref-style-references}
136+
### References
137+
138+
Add references to headings to allow easier cross-referencing from other sections.
139+
Prefix the reference name with `ref-`, followed by at least one level of identifier for the page itself.
140+
Finally, add an identifier for the heading itself.
141+
[This section][ref-style-references] uses the identifier `ref-style-references`.

0 commit comments

Comments
 (0)