Skip to content

Commit e13661c

Browse files
committed
update style guide
1 parent b9f9f71 commit e13661c

File tree

1 file changed

+48
-41
lines changed

1 file changed

+48
-41
lines changed

content/en/docs/contribute/style/style-guide.md

Lines changed: 48 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ Changes to the style guide are made by SIG Docs as a group. To propose a change
1717
or addition, [add it to the agenda](https://docs.google.com/document/d/1ddHwLK3kUMX1wVFIwlksjTk0MsqitBnWPe1LRa1Rx5A/edit) for an upcoming SIG Docs meeting, and attend the meeting to participate in the
1818
discussion.
1919

20-
21-
2220
<!-- body -->
2321

2422
{{< note >}}
@@ -48,12 +46,11 @@ When you refer specifically to interacting with an API object, use [UpperCamelCa
4846

4947
When you are generally discussing an API object, use [sentence-style capitalization](https://docs.microsoft.com/en-us/style-guide/text-formatting/using-type/use-sentence-style-capitalization).
5048

51-
You may use the word "resource", "API", or "object" to clarify a Kubernetes resource type in a sentence.
49+
You may use the word "resource", "API", or "object" to clarify a Kubernetes resource type in a sentence.
5250

53-
Don't split the API object name into separate words. For example, use
54-
PodTemplateList, not Pod Template List.
51+
Don't split an API object name into separate words. For example, use PodTemplateList, not Pod Template List.
5552

56-
The following examples focus on capitalization. Review the related guidance on [Code Style](#code-style-inline-code) for more information on formatting API objects.
53+
The following examples focus on capitalization. For more information about formatting API object names, review the related guidance on [Code Style](#code-style-inline-code).
5754

5855
{{< table caption = "Do and Don't - Use Pascal case for API objects" >}}
5956
Do | Don't
@@ -65,17 +62,18 @@ Every ConfigMap object is part of a namespace. | Every configMap object is part
6562
For managing confidential data, consider using the Secret API. | For managing confidential data, consider using the secret API.
6663
{{< /table >}}
6764

68-
6965
### Use angle brackets for placeholders
7066

7167
Use angle brackets for placeholders. Tell the reader what a placeholder
72-
represents.
68+
represents, for example:
7369

74-
1. Display information about a pod:
70+
Display information about a pod:
7571

76-
kubectl describe pod <pod-name> -n <namespace>
72+
```shell
73+
kubectl describe pod <pod-name> -n <namespace>
74+
```
7775

78-
If the namespace of the pod is `default`, you can omit the '-n' parameter.
76+
If the namespace of the pod is `default`, you can omit the '-n' parameter.
7977

8078
### Use bold for user interface elements
8179

@@ -189,7 +187,6 @@ Set the value of `image` to nginx:1.16. | Set the value of `image` to `nginx:1.1
189187
Set the value of the `replicas` field to 2. | Set the value of the `replicas` field to `2`.
190188
{{< /table >}}
191189

192-
193190
## Code snippet formatting
194191

195192
### Don't include the command prompt
@@ -200,17 +197,20 @@ Do | Don't
200197
kubectl get pods | $ kubectl get pods
201198
{{< /table >}}
202199

203-
204200
### Separate commands from output
205201

206202
Verify that the pod is running on your chosen node:
207203

208-
kubectl get pods --output=wide
204+
```shell
205+
kubectl get pods --output=wide
206+
```
209207

210208
The output is similar to this:
211209

212-
NAME READY STATUS RESTARTS AGE IP NODE
213-
nginx 1/1 Running 0 13s 10.200.0.4 worker0
210+
```console
211+
NAME READY STATUS RESTARTS AGE IP NODE
212+
nginx 1/1 Running 0 13s 10.200.0.4 worker0
213+
```
214214

215215
### Versioning Kubernetes examples
216216

@@ -263,17 +263,17 @@ Hugo [Shortcodes](https://gohugo.io/content-management/shortcodes) help create d
263263

264264
2. Use the following syntax to apply a style:
265265

266-
```
267-
{{</* note */>}}
268-
No need to include a prefix; the shortcode automatically provides one. (Note:, Caution:, etc.)
269-
{{</* /note */>}}
270-
```
266+
```none
267+
{{</* note */>}}
268+
No need to include a prefix; the shortcode automatically provides one. (Note:, Caution:, etc.)
269+
{{</* /note */>}}
270+
```
271271

272-
The output is:
272+
The output is:
273273

274-
{{< note >}}
275-
The prefix you choose is the same text for the tag.
276-
{{< /note >}}
274+
{{< note >}}
275+
The prefix you choose is the same text for the tag.
276+
{{< /note >}}
277277

278278
### Note
279279

@@ -403,7 +403,7 @@ The output is:
403403

404404
1. Prepare the batter, and pour into springform pan.
405405

406-
{{< note >}}Grease the pan for best results.{{< /note >}}
406+
{{< note >}}Grease the pan for best results.{{< /note >}}
407407

408408
1. Bake for 20-25 minutes or until set.
409409

@@ -417,13 +417,14 @@ Shortcodes inside include statements will break the build. You must insert them
417417
{{</* /note */>}}
418418
```
419419

420-
421420
## Markdown elements
422421

423422
### Line breaks
423+
424424
Use a single newline to separate block-level content like headings, lists, images, code blocks, and others. The exception is second-level headings, where it should be two newlines. Second-level headings follow the first-level (or the title) without any preceding paragraphs or texts. A two line spacing helps visualize the overall structure of content in a code editor better.
425425

426426
### Headings
427+
427428
People accessing this documentation may use a screen reader or other assistive technology (AT). [Screen readers](https://en.wikipedia.org/wiki/Screen_reader) are linear output devices, they output items on a page one at a time. If there is a lot of content on a page, you can use headings to give the page an internal structure. A good page structure helps all readers to easily navigate the page or filter topics of interest.
428429

429430
{{< table caption = "Do and Don't - Headings" >}}
@@ -453,24 +454,24 @@ Write hyperlinks that give you context for the content they link to. For example
453454
Write Markdown-style links: `[link text](URL)`. For example: `[Hugo shortcodes](/docs/contribute/style/hugo-shortcodes/#table-captions)` and the output is [Hugo shortcodes](/docs/contribute/style/hugo-shortcodes/#table-captions). | Write HTML-style links: `<a href="/media/examples/link-element-example.css" target="_blank">Visit our tutorial!</a>`, or create links that open in new tabs or windows. For example: `[example website](https://example.com){target="_blank"}`
454455
{{< /table >}}
455456

456-
457457
### Lists
458+
458459
Group items in a list that are related to each other and need to appear in a specific order or to indicate a correlation between multiple items. When a screen reader comes across a list—whether it is an ordered or unordered list—it will be announced to the user that there is a group of list items. The user can then use the arrow keys to move up and down between the various items in the list.
459460
Website navigation links can also be marked up as list items; after all they are nothing but a group of related links.
460461

461-
- End each item in a list with a period if one or more items in the list are complete sentences. For the sake of consistency, normally either all items or none should be complete sentences.
462+
- End each item in a list with a period if one or more items in the list are complete sentences. For the sake of consistency, normally either all items or none should be complete sentences.
462463

463-
{{< note >}} Ordered lists that are part of an incomplete introductory sentence can be in lowercase and punctuated as if each item was a part of the introductory sentence.{{< /note >}}
464+
{{< note >}} Ordered lists that are part of an incomplete introductory sentence can be in lowercase and punctuated as if each item was a part of the introductory sentence.{{< /note >}}
464465

465-
- Use the number one (`1.`) for ordered lists.
466+
- Use the number one (`1.`) for ordered lists.
466467

467-
- Use (`+`), (`*`), or (`-`) for unordered lists.
468+
- Use (`+`), (`*`), or (`-`) for unordered lists.
468469

469-
- Leave a blank line after each list.
470+
- Leave a blank line after each list.
470471

471-
- Indent nested lists with four spaces (for example, ⋅⋅⋅⋅).
472+
- Indent nested lists with four spaces (for example, ⋅⋅⋅⋅).
472473

473-
- List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either four spaces or one tab.
474+
- List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either four spaces or one tab.
474475

475476
### Tables
476477

@@ -490,7 +491,6 @@ Do | Don't
490491
This command starts a proxy. | This command will start a proxy.
491492
{{< /table >}}
492493

493-
494494
Exception: Use future or past tense if it is required to convey the correct
495495
meaning.
496496

@@ -503,7 +503,6 @@ You can explore the API using a browser. | The API can be explored using a brows
503503
The YAML file specifies the replica count. | The replica count is specified in the YAML file.
504504
{{< /table >}}
505505

506-
507506
Exception: Use passive voice if active voice leads to an awkward construction.
508507

509508
### Use simple and direct language
@@ -527,7 +526,6 @@ You can create a Deployment by ... | We'll create a Deployment by ...
527526
In the preceding output, you can see... | In the preceding output, we can see ...
528527
{{< /table >}}
529528

530-
531529
### Avoid Latin phrases
532530

533531
Prefer English terms over Latin abbreviations.
@@ -539,7 +537,6 @@ For example, ... | e.g., ...
539537
That is, ...| i.e., ...
540538
{{< /table >}}
541539

542-
543540
Exception: Use "etc." for et cetera.
544541

545542
## Patterns to avoid
@@ -557,7 +554,6 @@ Kubernetes provides a new feature for ... | We provide a new feature ...
557554
This page teaches you how to use pods. | In this page, we are going to learn about pods.
558555
{{< /table >}}
559556

560-
561557
### Avoid jargon and idioms
562558

563559
Some readers speak English as a second language. Avoid jargon and idioms to help them understand better.
@@ -569,7 +565,6 @@ Internally, ... | Under the hood, ...
569565
Create a new cluster. | Turn up a new cluster.
570566
{{< /table >}}
571567

572-
573568
### Avoid statements about the future
574569

575570
Avoid making promises or giving hints about the future. If you need to talk about
@@ -588,6 +583,18 @@ In version 1.4, ... | In the current version, ...
588583
The Federation feature provides ... | The new Federation feature provides ...
589584
{{< /table >}}
590585

586+
### Avoid words that assume a specific level of understanding
587+
588+
Avoid words such as "just", "simply", "easy", "easily", or "simple". These words do not add value.
589+
590+
{{< table caption = "Do and Don't - Avoid insensitive words" >}}
591+
Do | Don't
592+
:--| :-----
593+
Include one command in ... | Include just one command in ...
594+
Run the container ... | Simply run the container ...
595+
You can easily remove ... | You can remove ...
596+
These simple steps ... | These steps ...
597+
{{< /table >}}
591598

592599
## {{% heading "whatsnext" %}}
593600

0 commit comments

Comments
 (0)