Skip to content

Commit 218efe1

Browse files
authored
Merge pull request #96408 from jeana-redhat/migration-compatible-metadata-sample
Updates samples for migration, removes stale guidelines
2 parents 1fcdda2 + cd14b29 commit 218efe1

File tree

1 file changed

+32
-93
lines changed

1 file changed

+32
-93
lines changed

contributing_to_docs/doc_guidelines.adoc

Lines changed: 32 additions & 93 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`.
@@ -54,10 +56,10 @@ toc::[] <7>
5456
* Do not use "Optional:" to prefix an assembly title. According to IBM Style Guide, this practice is reserved for optional steps and code callouts.
5557
* 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)"].
5658
* 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.
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
@@ -260,9 +265,7 @@ If you accidentally create an incorrect symbolic link, you can remove that link
260265

261266
Use sentence case in all titles and section headings. See http://www.titlecase.com/ or https://convertcase.net/ for a conversion tool.
262267

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

267270
* Creating
268271
* Managing
@@ -274,7 +277,10 @@ Do not use backticks or other markup in assembly or module headings.
274277

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

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

279285
=== Anchoring titles and section headings
280286

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

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

322-
===== Assembly subsections (Level 1 and lower headings)
328+
===== Assembly subsections (Level 1 headings)
323329

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

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

332338
This ensures a unique anchor ID across the repo.
333339

340+
Do not use H3 headings (`===`) or lower in any files.
341+
334342
==== Anchoring in module files
335343

336344
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:
397405
== Writing assemblies
398406
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.
399407

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

402410
.Standard module include syntax
403411
[source,text]
404412
----
405413
include::modules/module-filename.adoc[leveloffset=+1] <1>
414+
<2>
406415
----
407416
<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.
408418

409419
[IMPORTANT]
410420
====
@@ -539,9 +549,9 @@ For more information about creating text snippets, see the
539549
link:https://redhat-documentation.github.io/modular-docs/#using-text-snippets[_Red Hat modular docs reference guide_].
540550

541551
[id="Auto-generated-content"]
542-
== Auto-generated content
552+
== Automatically generated content
543553

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

546556
* The OpenShift CLI (`oc`) command references `modules/oc-by-example-content.adoc` and `modules/oc-adm-by-example-content.adoc`.
547557
* 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
561571
|===
562572
|Branch |Control plane node reference
563573

564-
|`main`, `enterprise-4.9`, and later enterprise versions
574+
|All supported versions
565575
|Control plane node
566576

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-
573577
|===
574578

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

577581
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.
578582

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-
====
583-
584583
[id="adding-a-subsection-on-making-open-source-more-inclusive"]
585584
=== Adding a subsection on making open source more inclusive
586585

@@ -1897,68 +1896,8 @@ The notes immediately follow the table, instead of appearing at the bottom of th
18971896

18981897
[id="collapsible-content"]
18991898
=== 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.
19011899

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

19631902
=== Quick reference
19641903

0 commit comments

Comments
 (0)