4 minute read
This page gives writing formatting guidelines for the Gardener documentation. For style guidelines, see the Style Guide.
These are guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
Formatting of Inline Elements
|Type of Text||Formatting||Markdown Syntax|
|User Interface Elements||italics|
|New Terms and Emphasis||bold|
|API Objects and Technical Components|
|Inline Code and Inline Commands|
|Object Field Names and Field Values|
|Links and References||link|
User Interface Elements
When referring to UI elements, refrain from using verbs like “Click” or “Select with right mouse button”. This level of detail is hardly ever needed and also invalidates a procedure if other devices are used. For example, for a tablet you’d say “Tap on”.
Use italics when you refer to UI elements.
|UI Element||Standard Formulation||Markdown Syntax|
|Button, Menu path||Choose UI Element.|
|Menu path, context menu, navigation path||Choose System > User Profile > Own Data.|
|Entry fields||Enter your password.|
|Checkbox, radio button||Select Filter.|
|Expandable screen elements||Expand User Settings.|
Collapse User Settings.
New Terms and Emphasis
Use bold to emphasize something or to introduce a new term.
|A cluster is a set of nodes …||A “cluster” is a set of nodes …|
|The system does not delete your objects.||The system does not(!) delete your objects.|
Use code style (using backticks) for filenames, technical componentes, directories, and paths.
|Open file ||Open the envars.yaml file.|
|Go to directory ||Go to the /docs/tutorials directory.|
|Open file ||Open the /_data/concepts.yaml file.|
API Objects and Technical Components
When you refer to an API object, use the same uppercase and lowercase letters that are used in the actual object name, and use backticks to format them. Typically, the names of API objects use camel case.
Don’t split the API object name into separate words. For example, use
PodTemplateList, not Pod Template List.
Refer to API objects without saying “object,” unless omitting “object” leads to an awkward construction.
|The ||The pod has two containers.|
|The ||The Deployment object is responsible for …|
|A ||A Pod List is a list of pods.|
|The ||The gardener-control-manager has control loops…|
|The ||The gardenlet starts up with a bootstrap kubeconfig having a bootstrap token that allows to create CertificateSigningRequest (CSR) resources.|
Inline Code and Inline Commands
Use backticks (`) for inline code.
|The ||The “kubectl run” command creates a Deployment.|
|For declarative management, use ||For declarative management, use “kubectl apply”.|
Object Field Names and Field Values
Use backticks (`) for field names, and field values.
|Set the value of the ||Set the value of the “replicas” field in the configuration file.|
|The value of the ||The value of the “exec” field is an ExecAction object.|
|Set the value of ||Set the value of |
|Set the value of ||the value of |
Links and References
|Use a descriptor of the link’s destination: “For more information, visit Gardener’s website.”||Use a generic placeholder: “For more information, go here.”|
Another thing to keep in mind is that markdown links do not work in shortcodes. To circumvent this problem, you can use HTML links.
- Use H1 for the title of the topic.
- Use H2 for each main section.
- Use H3 for any sub-section in the main sections.
- Avoid using H4-H6. Try moving the additional information to a new topic instead.
Code Snippet Formatting
Don’t include the command prompt
Separate commands from output
Verify that the pod is running on your chosen node:
kubectl get pods --output=wide
The output is similar to:
NAME READY STATUS RESTARTS AGE IP NODE nginx 1/1 Running 0 13s 10.200.0.4 worker0
Use angle brackets for placeholders. Tell the reader what a placeholder represents, for example:
Display information about a pod:
kubectl describe pod <pod-name>
<pod-name>is the name of one of your pods.
Versioning Kubernetes examples
Make code examples and configuration examples that include version information consistent with the accompanying text. Identify the Kubernetes version in the Prerequisites section.