You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contributing_to_docs/doc_guidelines.adoc
+32-93Lines changed: 32 additions & 93 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,10 +39,12 @@ Every assembly file must contain the following metadata at the top, with no blan
39
39
:_mod-docs-content-type: ASSEMBLY <1>
40
40
[id="<assembly-anchor-id>"] <2>
41
41
= Assembly title <3>
42
-
include::_attributes/common-attributes.adoc[] <4>
43
-
:context: <assembly-context> <5>
42
+
<4>
43
+
include::_attributes/common-attributes.adoc[] <5>
44
44
<6>
45
-
toc::[] <7>
45
+
:context: <assembly-context> <7>
46
+
<8>
47
+
toc::[] <9>
46
48
----
47
49
<1> The content type for the file. For assemblies, always use `:_mod-docs-content-type: ASSEMBLY`. Place this attribute before the anchor ID or, if present, the conditional that contains the anchor ID.
48
50
<2> A unique (within OpenShift docs) anchor ID for this assembly. Use lowercase and hyphens, for example: `cli-developer-commands`.
@@ -54,10 +56,10 @@ toc::[] <7>
54
56
* Do not use "Optional:" to prefix an assembly title. According to IBM Style Guide, this practice is reserved for optional steps and code callouts.
55
57
* With content reuse and modular documentation, you cannot be certain that all future use of an assembly will remain optional. For more information, see link:https://www.ibm.com/docs/en/ibm-style?topic=format-procedures#indicating-optional-and-conditional-steps["Indicating optional and conditional steps (Requires IBM Style login)"].
56
58
* The assembly title, which is the first line of the document, is the only level 1 ( `=` ) title.
57
-
Section headers within the assembly must be level 2 ( `==` ) or lower. When you include modules, you must add leveloffsets in the include statements. You can manually add more level 2 or lower section headers in the assembly.
59
+
Section headers within the assembly must be H2 ("Level 1" in AsciiDoc terminology), formatted as `==`. When you include modules, you must add leveloffsets in the include statements. You can manually add more H2 (`==`) section headers in the assembly.
58
60
====
59
-
60
-
<4> Includes attributes common to OpenShift docs.
61
+
<4> You must include a blank line after H1 ("Level 0" in AsciiDoc terminology) headings.
62
+
<5> Includes attributes common to OpenShift docs.
61
63
+
62
64
[NOTE]
63
65
====
@@ -68,20 +70,21 @@ Section headers within the assembly must be level 2 ( `==` ) or lower. When you
68
70
----
69
71
:_mod-docs-content-type: ASSEMBLY
70
72
include::_attributes/common-attributes.adoc[]
73
+
71
74
[id="installing-ibm-cloud-private"]
72
75
= Installing a private cluster on {ibm-cloud-title}
76
+
73
77
:context: installing-ibm-cloud-private
74
78
75
79
toc::[]
76
80
----
77
81
====
78
-
+
79
-
<5> Context used for identifying headers in modules that is the same as the anchor ID. Use lowercase and hyphens, for example `cli-developer-commands`.
80
-
<6> A blank line. You *must* have a blank line here before the `toc::[]`.
82
+
<6> You must include a blank line after each `include::` statement.
83
+
<7> Context used for identifying headers in modules that is the same as the anchor ID. Use lowercase and hyphens, for example `cli-developer-commands`.
84
+
<8> A blank line. You *must* have a blank line here before the `toc::[]`.
81
85
+
82
86
After the heading block and a single whitespace line, you can include any content for this assembly.
83
-
84
-
<7> The table of contents for the current assembly.
87
+
<9> The table of contents for the current assembly.
85
88
86
89
[id="module-file-metadata"]
87
90
== Module file metadata
@@ -95,6 +98,7 @@ Every module should be placed in the modules folder and should contain the follo
95
98
:_mod-docs-content-type: <TYPE> <2>
96
99
[id="<module-anchor>_{context}"] <3>
97
100
= Module title <4>
101
+
<5>
98
102
----
99
103
100
104
<1> List of assemblies in which this module is included.
@@ -109,6 +113,7 @@ Every module should be placed in the modules folder and should contain the follo
109
113
* Do not use "Optional:" to prefix a module title. According to IBM Style, this practice is reserved for optional steps and code callouts.
110
114
* With content reuse and modular documentation, you cannot be certain that all future use of a module will remain optional. For more information, see link:https://www.ibm.com/docs/en/ibm-style?topic=format-procedures#indicating-optional-and-conditional-steps["Indicating optional and conditional steps (Requires IBM Style login)"].
111
115
====
116
+
<5> You must include a blank line after H1 ("Level 0" in AsciiDoc terminology) headings.
112
117
113
118
[id="snippet-file-metadata"]
114
119
== Text snippet file metadata
@@ -260,9 +265,7 @@ If you accidentally create an incorrect symbolic link, you can remove that link
260
265
261
266
Use sentence case in all titles and section headings. See http://www.titlecase.com/ or https://convertcase.net/ for a conversion tool.
262
267
263
-
Try to be as descriptive as possible with the title or section headings
264
-
without making them unnecessarily long. For assemblies and task modules,
265
-
use a gerund form in headings, such as:
268
+
Try to be as descriptive as possible with the title or section headings without making them unnecessarily long. For assemblies and task modules, use a gerund form in headings, such as:
266
269
267
270
* Creating
268
271
* Managing
@@ -274,7 +277,10 @@ Do not use backticks or other markup in assembly or module headings.
274
277
275
278
Do not use special characters or symbols in titles. Symbols and special characters in titles can cause rendering errors in the HTML output.
276
279
277
-
Use only one link:https://docs.asciidoctor.org/asciidoc/latest/sections/titles-and-levels/#section-level-syntax[Level 0] heading (`=`) in any file.
280
+
Use only one link:https://docs.asciidoctor.org/asciidoc/latest/sections/titles-and-levels/#section-level-syntax[Level 0] (`=`) heading in any file.
281
+
Level 0 headings map to an H1 or `<h1>` in HTML.
282
+
283
+
Do not use Level 2 (H3) headings (`===`) or lower in any files.
278
284
279
285
=== Anchoring titles and section headings
280
286
@@ -319,9 +325,9 @@ This guideline includes an exception to the link:https://redhat-documentation.gi
319
325
320
326
The anchor ID for the assembly title should match the `:context:` set in the xref:assembly-file-metadata[assembly file metadata].
321
327
322
-
===== Assembly subsections (Level 1 and lower headings)
328
+
===== Assembly subsections (Level 1 headings)
323
329
324
-
For any Level 1 or lower _subsections_ in an assembly (for example, `==`, `===`, etc.), add a `_{context}` variable to the end of anchor IDs:
330
+
For any Level 1 _subsections_ in an assembly (i.e. `==`), add a `_{context}` variable to the end of anchor IDs:
325
331
326
332
.Example anchor ID for a Level 1 heading (subsection) of an assembly file
327
333
----
@@ -331,6 +337,8 @@ For any Level 1 or lower _subsections_ in an assembly (for example, `==`, `===`,
331
337
332
338
This ensures a unique anchor ID across the repo.
333
339
340
+
Do not use H3 headings (`===`) or lower in any files.
341
+
334
342
==== Anchoring in module files
335
343
336
344
You must add the `_{context}` variable to the end of each anchor ID in module files, for any section level:
@@ -397,14 +405,16 @@ To use a discrete heading, add `[discrete]` to the line before your unique ID:
397
405
== Writing assemblies
398
406
An _assembly_ is a collection of modules that describes how to accomplish a user story. Module content is added to an assembly using the `include` directive. The `include` directive includes contents from another file in the current document. Files can be modules or snippets formatted in AsciiDoc, or another text format such as YAML.
399
407
400
-
An `include` directive must always be on its own line.
408
+
An `include` directive must always be on its own line and be followed by a blank line.
<1> `[leveloffset=]` link:https://docs.asciidoctor.org/asciidoc/latest/directives/include-with-leveloffset/#manipulate-heading-levels-with-leveloffset[is relative], and changes the header level of included content.
417
+
<2> You must include a blank line after each `include::` statement.
408
418
409
419
[IMPORTANT]
410
420
====
@@ -539,9 +549,9 @@ For more information about creating text snippets, see the
539
549
link:https://redhat-documentation.github.io/modular-docs/#using-text-snippets[_Red Hat modular docs reference guide_].
540
550
541
551
[id="Auto-generated-content"]
542
-
== Auto-generated content
552
+
== Automatically generated content
543
553
544
-
The following content is auto-generated in each release and must not be manually edited:
554
+
The following content is automatically generated in each release and must not be manually edited:
545
555
546
556
* The OpenShift CLI (`oc`) command references `modules/oc-by-example-content.adoc` and `modules/oc-adm-by-example-content.adoc`.
547
557
* The following API references content in the `rest_api` folder: the contents of all `<topic>_apis` subfolders and the `rest_api/objects/index.adoc` and `rest_api/index.adoc` assemblies.
@@ -561,26 +571,15 @@ To assist with the removal of the problematic word "master" from the documentati
561
571
|===
562
572
|Branch |Control plane node reference
563
573
564
-
|`main`, `enterprise-4.9`, and later enterprise versions
574
+
|All supported versions
565
575
|Control plane node
566
576
567
-
|`enterprise-4.8` and earlier enterprise versions
568
-
|Control plane (also known as master) node
569
-
570
-
|`enterprise-3.11`
571
-
|Master node
572
-
573
577
|===
574
578
575
579
You can replace "node" in the preceding examples with "machine", "host", or another suitable description.
576
580
577
581
In general text, use the term "control plane machine" in place of "master machine"; use the term "compute machine" in place of "worker machine". Be mindful of certain valid code entities, such as `master` role, `worker` role, and `infra` role.
578
582
579
-
[NOTE]
580
-
====
581
-
If you are cherry picking from `main` to `enterprise-4.8` or earlier, you must manually cherry pick to include the “(also known as master)” phrasing. This is required only if the phrase “control plane” is introduced for the first time in an assembly or module.
=== Adding a subsection on making open source more inclusive
586
585
@@ -1897,68 +1896,8 @@ The notes immediately follow the table, instead of appearing at the bottom of th
1897
1896
1898
1897
[id="collapsible-content"]
1899
1898
=== Collapsible content
1900
-
You can collapse sections of content by using the `collapsible` option, which converts the Asciidoctor markup to HTML `details` and `summary` sections. The `collapsible` option is used at the writer's discretion and is appropriate for considerably long code blocks, lists, or other such content that significantly increases the length of a module or assembly.
1901
1899
1902
-
[NOTE]
1903
-
====
1904
-
You must set a title for the `summary` section. If a title is not set, the default title is "Details."
1905
-
====
1906
-
1907
-
Collapsible content is formatted as shown:
1908
-
1909
-
....
1910
-
.Title of the `summary` dropdown
1911
-
[%collapsible]
1912
-
====
1913
-
This is content within the `details` section.
1914
-
====
1915
-
....
1916
-
1917
-
This renders as a dropdown with collapsed content:
1918
-
1919
-
.Title of the `summary` dropdown
1920
-
[%collapsible]
1921
-
====
1922
-
This is content within the `details` section.
1923
-
====
1924
-
1925
-
If your collapsible content includes an admonition such as a note or warning, the admonition must be nested:
1926
-
1927
-
....
1928
-
.Collapsible content that includes an admonition
1929
-
[%collapsible]
1930
-
====
1931
-
This content includes an admonition.
1932
-
1933
-
[source,terminal]
1934
-
----
1935
-
$ oc whoami
1936
-
----
1937
-
1938
-
[NOTE]
1939
-
=====
1940
-
Nest admonitions when using the `collapsible` option.
1941
-
=====
1942
-
====
1943
-
....
1944
-
1945
-
This renders as:
1946
-
1947
-
.Collapsible content that includes an admonition
1948
-
[%collapsible]
1949
-
====
1950
-
This content includes an admonition.
1951
-
1952
-
[source,terminal]
1953
-
----
1954
-
$ oc whoami
1955
-
----
1956
-
1957
-
[NOTE]
1958
-
=====
1959
-
Nest admonitions when using the `collapsible` option.
1960
-
=====
1961
-
====
1900
+
Creating collapsible sections of content by using the `collapsible` option is not supported by our publication tooling.
0 commit comments