content/contribute/writing-style-guide.md
The most important points of the style guide include:
<!-- vale off -->k8s.Crossplane relies on Vale to enforce the complete style guide.
Read more about [using Vale with the Crossplane documentation]({{<ref "Vale" >}}).
Use italics to introduce or draw attention term.
Use italics on the same term sparingly.
Use inline code styles, single ticks (`) for files directories or paths.
Use the {{</* hover */>}} shortcode to relate command explanations to larger examples.
Use angle brackets (< >) for placeholders. Use a short, descriptive name
inside the brackets. Use underscores between words to simplify selections.
For example, to creating AWS credentials prompts for the key and secret key.
[default]
aws_access_key_id = <aws_access_key>
aws_secret_access_key = <aws_secret_key>
Kinds should be upper camel case. Capitalize each word, without separators.
<!-- vale Google.FirstPerson = NO --> <!-- ignore "My" -->For example the {{<hover label="kind" line="4" >}}kind: MyComputeResource{{< /hover >}} capitalizes "My," "Compute" and "Resource" with no spaces or dashes.
<!-- vale Google.FirstPerson = YES -->spec:
group: test.example.org
names:
kind: MyComputeResource
Object names should use snake case. All words are lowercase with dashes (-)
between them.
For example the {{<hover label="kind" line="4" >}}name: my-resource{{< /hover >}} uses all lowercase. A dash separates "my" and "resource."
<!-- vale Google.FirstPerson = YES -->apiVersion: test.example.org/v1alpha1
kind: MyComputeResource
metadata:
name: my-resource
Kubernetes objects mentioned inline don't require styling unless drawing special attention.