Skip to content

Commit 41afd67

Browse files
Merge pull request #183 from Kuadrant/style-guide
Add some contributing notes and a style guide
2 parents aed4919 + 88719de commit 41afd67

File tree

3 files changed

+118
-0
lines changed

3 files changed

+118
-0
lines changed

CONTRIBUTING.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
The site configuration and navigation layout are defined in [./mkdocs.yml](./mkdocs.yml).
2+
The navigation sections follow the [Diátaxis framework](https://diataxis.fr/), with four main areas:
3+
4+
- Concepts (known as 'Explanation' in Diátaxis)
5+
- APIs & Reference
6+
- Tutorials
7+
- Guides
8+
9+
When adding new documentation, take a moment to consider which area the document belongs to.
10+
You can use the [Diátaxis compass](https://diataxis.fr/compass/) to help answer that question.
11+
If you are unsure, raise an issue, create a PR anyways to invite discussion, or reach out on the [#kuadrant](https://kubernetes.slack.com/archives/C05J0D0V525) slack channel.
12+
13+
When writing content, refer to the [./style_guide.md](./style_guide.md) for writing style guidelines, tips and examples.

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
This repository contains documentation for Kuadrant, built using MkDocs and the `mike` plugin for multi-versioning. You can run and build these docs using Docker/Podman or by installing MkDocs locally.
66

7+
## Contributing
8+
9+
See [./CONTRIBUTING.md](./CONTRIBUTING.md)
10+
711
## Using Docker/Podman
812

913
### Running the Docs with Docker

style_guide.md

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Style Guide
2+
3+
## Framework
4+
5+
Follow the [Diátaxis approach](https://diataxis.fr/) when you think about and work on new documentation.
6+
This approach helps you decide on what kind of documentation to write and how to write it well.
7+
8+
## Voice
9+
10+
Documents should be written mainly in a combination of "second person" and "active voice", depending on the context.
11+
12+
### Second Person
13+
14+
Address the reader directly, often using "you".
15+
For example, "You need to create a HTTPRoute",
16+
rather than saying "An HTTPRoute needs to be created by you."
17+
18+
### Active Voice
19+
20+
The subject of the sentence performs the action.
21+
For example, "The Gateway controller processes the HTTPRoute to establish routing rules",
22+
rather than saying "The HTTPRoute is processed by the Gateway controller to establish routing rules"
23+
24+
## Tense
25+
26+
Use present tense, unless the meaning is better conveyed in future or past tense.
27+
For example, "This command starts the operator"
28+
rather than "This command will start the operator"
29+
30+
## Language
31+
32+
Use simple and direct language. Avoid unnecessary phrases, such as saying 'please'.
33+
For example, use "To create a ReplicaSet,..." instead of "In order to create a ReplicaSet, ...".
34+
Another example, use "View the pods." instead of "With this next command, we'll view the pods".
35+
36+
## Avoid jargon and idioms
37+
38+
Some readers may not speak English as a primary language. Avoid jargon and idioms to help them understand better.
39+
For example, use "Internally,..." instead of "Under the hood,...",
40+
or "Create a new cluster." instead of "Spin up a cluster."
41+
42+
## Avoid time sensitive statements
43+
44+
Avoid making promises or giving hints about the future. If you need to talk about an alpha feature, put the text under a heading that identifies it as alpha information.
45+
An exception to this would be mentioning the deprecation (and potential eventual removal) of some API.
46+
47+
Avoid statements that will soon be out of date.
48+
An indication of this is words like "currently" and "new." A feature that is new today might not be considered new in a few months.
49+
50+
For example, use "In version 1.0, ..." instead of "In the current version, ...".
51+
52+
## Avoid words that don't add value
53+
54+
Avoid words such as "just", "simply", "easy", "easily", or "simple". These words do not add value.
55+
56+
## Images
57+
58+
Avoid the overuse of images and screenshots as they can be a pain to maintain.
59+
60+
## Characters
61+
62+
Avoid the use of unusual characters, for example Unicode numbering and emojis.
63+
64+
## Grammar
65+
66+
* Start sentences with capital letters and end with . or :
67+
* Products, projects, and tools should be capitalised i.e Kuadrant, Authorino, Limitador etc
68+
69+
## Inline Blocks, Notes & Warnings
70+
71+
To highlight some content like blocks, notes or warnings, use the correct formatting as per https://squidfunk.github.io/mkdocs-material/reference/admonitions/#inline-blocks
72+
73+
For example:
74+
75+
````markdown
76+
```markdown
77+
!!! note
78+
79+
This method currently only works if the Gateway is provided by Istio, with service mesh capabilities enabled across the cluster.
80+
```
81+
````
82+
83+
## Code Blocks
84+
85+
For code blocks preface the language in the code block as per https://squidfunk.github.io/mkdocs-material/reference/code-blocks/#usage
86+
87+
For example:
88+
89+
````markdown
90+
```bash
91+
kubectl get deployments -n kuadrant-system
92+
```
93+
````
94+
95+
## Numbering in lists
96+
97+
Avoid the overuse of numbering. It allows for docs to be updated much easier in the future.
98+
99+
## Environment Variables
100+
101+
Environment variables should be capitalised and use 'KUADRANT_' at the start, for example, `KUADRANT_GATEWAY_NS`, unless they are already defined environment variables for existing tools and services.

0 commit comments

Comments
 (0)