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
+99-86Lines changed: 99 additions & 86 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`.
@@ -56,8 +58,8 @@ toc::[] <7>
56
58
* The assembly title, which is the first line of the document, is the only level 1 ( `=` ) title.
57
59
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.
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
@@ -274,7 +279,9 @@ Do not use backticks or other markup in assembly or module headings.
274
279
275
280
Do not use special characters or symbols in titles. Symbols and special characters in titles can cause rendering errors in the HTML output.
276
281
277
-
Use only one link:https://docs.asciidoctor.org/asciidoc/latest/sections/titles-and-levels/#section-level-syntax[Level 0] heading (`=`) in any file.
282
+
Use only one link:https://docs.asciidoctor.org/asciidoc/latest/sections/titles-and-levels/#section-level-syntax[Level 0] (maps to an H1 or `<h1>` in HTML) heading (`=`) in any file.
283
+
284
+
Do not use H3 headings (`===`) or lower in any files.
278
285
279
286
=== Anchoring titles and section headings
280
287
@@ -319,9 +326,9 @@ This guideline includes an exception to the link:https://redhat-documentation.gi
319
326
320
327
The anchor ID for the assembly title should match the `:context:` set in the xref:assembly-file-metadata[assembly file metadata].
321
328
322
-
===== Assembly subsections (Level 1 and lower headings)
329
+
===== Assembly subsections (Level 1 headings)
323
330
324
-
For any Level 1 or lower _subsections_ in an assembly (for example, `==`, `===`, etc.), add a `_{context}` variable to the end of anchor IDs:
331
+
For any Level 1 _subsections_ in an assembly (i.e. `==`), add a `_{context}` variable to the end of anchor IDs:
325
332
326
333
.Example anchor ID for a Level 1 heading (subsection) of an assembly file
327
334
----
@@ -331,6 +338,8 @@ For any Level 1 or lower _subsections_ in an assembly (for example, `==`, `===`,
331
338
332
339
This ensures a unique anchor ID across the repo.
333
340
341
+
Do not use H3 headings (`===`) or lower in any files.
342
+
334
343
==== Anchoring in module files
335
344
336
345
You must add the `_{context}` variable to the end of each anchor ID in module files, for any section level:
@@ -397,14 +406,16 @@ To use a discrete heading, add `[discrete]` to the line before your unique ID:
397
406
== Writing assemblies
398
407
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
408
400
-
An `include` directive must always be on its own line.
409
+
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.
418
+
<2> You must include a blank line after each `include::` statement.
408
419
409
420
[IMPORTANT]
410
421
====
@@ -539,9 +550,9 @@ For more information about creating text snippets, see the
539
550
link:https://redhat-documentation.github.io/modular-docs/#using-text-snippets[_Red Hat modular docs reference guide_].
540
551
541
552
[id="Auto-generated-content"]
542
-
== Auto-generated content
553
+
== Automatically generated content
543
554
544
-
The following content is auto-generated in each release and must not be manually edited:
555
+
The following content is automatically generated in each release and must not be manually edited:
545
556
546
557
* The OpenShift CLI (`oc`) command references `modules/oc-by-example-content.adoc` and `modules/oc-adm-by-example-content.adoc`.
547
558
* 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,25 +572,25 @@ To assist with the removal of the problematic word "master" from the documentati
561
572
|===
562
573
|Branch |Control plane node reference
563
574
564
-
|`main`, `enterprise-4.9`, and later enterprise versions
575
+
|All supported versions
565
576
|Control plane node
566
577
567
-
|`enterprise-4.8` and earlier enterprise versions
568
-
|Control plane (also known as master) node
578
+
// |`enterprise-4.8` and earlier enterprise versions
579
+
// |Control plane (also known as master) node
569
580
570
-
|`enterprise-3.11`
571
-
|Master node
581
+
// |`enterprise-3.11`
582
+
// |Master node
572
583
573
584
|===
574
585
575
586
You can replace "node" in the preceding examples with "machine", "host", or another suitable description.
576
587
577
588
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
589
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.
582
-
====
590
+
// [NOTE]
591
+
// ====
592
+
// 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
@@ -1897,68 +1908,70 @@ The notes immediately follow the table, instead of appearing at the bottom of th
1897
1908
1898
1909
[id="collapsible-content"]
1899
1910
=== 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
-
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
1911
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
-
====
1912
+
Creating collapsible sections of content by using the `collapsible` option is not supported by our publication tooling.
1913
+
// 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.
1914
+
1915
+
// [NOTE]
1916
+
// ====
1917
+
// You must set a title for the `summary` section. If a title is not set, the default title is "Details."
1918
+
// ====
1919
+
1920
+
// Collapsible content is formatted as shown:
1921
+
1922
+
// ....
1923
+
// .Title of the `summary` dropdown
1924
+
// [%collapsible]
1925
+
// ====
1926
+
// This is content within the `details` section.
1927
+
// ====
1928
+
// ....
1929
+
1930
+
// This renders as a dropdown with collapsed content:
1931
+
1932
+
// .Title of the `summary` dropdown
1933
+
// [%collapsible]
1934
+
// ====
1935
+
// This is content within the `details` section.
1936
+
// ====
1937
+
1938
+
// If your collapsible content includes an admonition such as a note or warning, the admonition must be nested:
1939
+
1940
+
// ....
1941
+
// .Collapsible content that includes an admonition
1942
+
// [%collapsible]
1943
+
// ====
1944
+
// This content includes an admonition.
1945
+
1946
+
// [source,terminal]
1947
+
// ----
1948
+
// $ oc whoami
1949
+
// ----
1950
+
1951
+
// [NOTE]
1952
+
// =====
1953
+
// Nest admonitions when using the `collapsible` option.
1954
+
// =====
1955
+
// ====
1956
+
// ....
1957
+
1958
+
// This renders as:
1959
+
1960
+
// .Collapsible content that includes an admonition
1961
+
// [%collapsible]
1962
+
// ====
1963
+
// This content includes an admonition.
1964
+
1965
+
// [source,terminal]
1966
+
// ----
1967
+
// $ oc whoami
1968
+
// ----
1969
+
1970
+
// [NOTE]
1971
+
// =====
1972
+
// Nest admonitions when using the `collapsible` option.
0 commit comments