Skip to content

Commit 64dea94

Browse files
committed
Updates samples for migration, removes stale guidelines
1 parent 601a9dc commit 64dea94

File tree

1 file changed

+99
-86
lines changed

1 file changed

+99
-86
lines changed

contributing_to_docs/doc_guidelines.adoc

Lines changed: 99 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ Every assembly file must contain the following metadata at the top, with no blan
3939
:_mod-docs-content-type: ASSEMBLY <1>
4040
[id="<assembly-anchor-id>"] <2>
4141
= Assembly title <3>
42-
include::_attributes/common-attributes.adoc[] <4>
43-
:context: <assembly-context> <5>
42+
<4>
43+
include::_attributes/common-attributes.adoc[] <5>
4444
<6>
45-
toc::[] <7>
45+
:context: <assembly-context> <7>
46+
<8>
47+
toc::[] <9>
4648
----
4749
<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.
4850
<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>
5658
* The assembly title, which is the first line of the document, is the only level 1 ( `=` ) title.
5759
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.
5860
====
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.
6163
+
6264
[NOTE]
6365
====
@@ -68,20 +70,21 @@ Section headers within the assembly must be level 2 ( `==` ) or lower. When you
6870
----
6971
:_mod-docs-content-type: ASSEMBLY
7072
include::_attributes/common-attributes.adoc[]
73+
7174
[id="installing-ibm-cloud-private"]
7275
= Installing a private cluster on {ibm-cloud-title}
76+
7377
:context: installing-ibm-cloud-private
7478
7579
toc::[]
7680
----
7781
====
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::[]`.
8185
+
8286
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.
8588

8689
[id="module-file-metadata"]
8790
== Module file metadata
@@ -95,6 +98,7 @@ Every module should be placed in the modules folder and should contain the follo
9598
:_mod-docs-content-type: <TYPE> <2>
9699
[id="<module-anchor>_{context}"] <3>
97100
= Module title <4>
101+
<5>
98102
----
99103

100104
<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
109113
* Do not use "Optional:" to prefix a module title. According to IBM Style, this practice is reserved for optional steps and code callouts.
110114
* 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)"].
111115
====
116+
<5> You must include a blank line after H1 ("Level 0" in AsciiDoc terminology) headings.
112117

113118
[id="snippet-file-metadata"]
114119
== Text snippet file metadata
@@ -274,7 +279,9 @@ Do not use backticks or other markup in assembly or module headings.
274279

275280
Do not use special characters or symbols in titles. Symbols and special characters in titles can cause rendering errors in the HTML output.
276281

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.
278285

279286
=== Anchoring titles and section headings
280287

@@ -319,9 +326,9 @@ This guideline includes an exception to the link:https://redhat-documentation.gi
319326

320327
The anchor ID for the assembly title should match the `:context:` set in the xref:assembly-file-metadata[assembly file metadata].
321328

322-
===== Assembly subsections (Level 1 and lower headings)
329+
===== Assembly subsections (Level 1 headings)
323330

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:
325332

326333
.Example anchor ID for a Level 1 heading (subsection) of an assembly file
327334
----
@@ -331,6 +338,8 @@ For any Level 1 or lower _subsections_ in an assembly (for example, `==`, `===`,
331338

332339
This ensures a unique anchor ID across the repo.
333340

341+
Do not use H3 headings (`===`) or lower in any files.
342+
334343
==== Anchoring in module files
335344

336345
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:
397406
== Writing assemblies
398407
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.
399408

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.
401410

402411
.Standard module include syntax
403412
[source,text]
404413
----
405414
include::modules/module-filename.adoc[leveloffset=+1] <1>
415+
<2>
406416
----
407417
<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.
408419

409420
[IMPORTANT]
410421
====
@@ -539,9 +550,9 @@ For more information about creating text snippets, see the
539550
link:https://redhat-documentation.github.io/modular-docs/#using-text-snippets[_Red Hat modular docs reference guide_].
540551

541552
[id="Auto-generated-content"]
542-
== Auto-generated content
553+
== Automatically generated content
543554

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:
545556

546557
* The OpenShift CLI (`oc`) command references `modules/oc-by-example-content.adoc` and `modules/oc-adm-by-example-content.adoc`.
547558
* 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
561572
|===
562573
|Branch |Control plane node reference
563574

564-
|`main`, `enterprise-4.9`, and later enterprise versions
575+
|All supported versions
565576
|Control plane node
566577

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
569580

570-
|`enterprise-3.11`
571-
|Master node
581+
// |`enterprise-3.11`
582+
// |Master node
572583

573584
|===
574585

575586
You can replace "node" in the preceding examples with "machine", "host", or another suitable description.
576587

577588
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.
578589

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.
593+
// ====
583594

584595
[id="adding-a-subsection-on-making-open-source-more-inclusive"]
585596
=== 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
18971908

18981909
[id="collapsible-content"]
18991910
=== 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-
----
19371911

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.
1973+
// =====
1974+
// ====
19621975

19631976
=== Quick reference
19641977

0 commit comments

Comments
 (0)