Skip to content

Commit e6cc611

Browse files
authored
Merge pull request #81460 from apinnick/move-optional-heading-guideline
Contributing to docs: assembly/module file metadata improvements
2 parents e399d55 + 59b72c1 commit e6cc611

File tree

1 file changed

+26
-39
lines changed

1 file changed

+26
-39
lines changed

contributing_to_docs/doc_guidelines.adoc

Lines changed: 26 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,30 @@ In the Pulsar editor, you can use `Ctrl`+`J` to undo hard wrapping on a paragrap
3333

3434
[id="assembly-file-metadata"]
3535
== Assembly file metadata
36-
Every assembly file should contain the following metadata at the top, with no line spacing in between, except where noted:
36+
Every assembly file must contain the following metadata at the top, with no blank lines, except where noted:
3737

3838
----
3939
:_mod-docs-content-type: ASSEMBLY <1>
40-
[id="<unique_heading_for_assembly>"] <2>
40+
[id="<assembly-anchor-id>"] <2>
4141
= Assembly title <3>
4242
include::_attributes/common-attributes.adoc[] <4>
43-
:context: <unique_context_for_assembly> <5>
43+
:context: <assembly-context> <5>
4444
<6>
4545
toc::[] <7>
4646
----
4747
<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.
4848
<2> A unique (within OpenShift docs) anchor ID for this assembly. Use lowercase and hyphens, for example: `cli-developer-commands`.
4949
<3> Human readable title (notice the `=` top-level header).
50+
+
51+
[NOTE]
52+
====
53+
* Do not use backticks or other markup in assembly headings. You can use backticks or other markup in the title for a block, such as a code block `.Example` or a table `.Description` title.
54+
* 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+
* 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+
* 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.
58+
====
59+
5060
<4> Includes attributes common to OpenShift docs.
5161
+
5262
[NOTE]
@@ -56,34 +66,22 @@ toc::[] <7>
5666
+
5767
[source,text]
5868
----
59-
:_mod-docs-content-type: ASSEMBLY
60-
include::_attributes/common-attributes.adoc[]
61-
[id="installing-ibm-cloud-private"]
62-
= Installing a private cluster on {ibm-cloud-title}
63-
:context: installing-ibm-cloud-private
69+
:_mod-docs-content-type: ASSEMBLY
70+
include::_attributes/common-attributes.adoc[]
71+
[id="installing-ibm-cloud-private"]
72+
= Installing a private cluster on {ibm-cloud-title}
73+
:context: installing-ibm-cloud-private
6474
6575
toc::[]
6676
----
6777
====
6878
+
6979
<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`.
7080
<6> A blank line. You *must* have a blank line here before the `toc::[]`.
71-
<7> The table of contents for the current assembly.
72-
73-
[NOTE]
74-
====
75-
* Do not use backticks or other markup in assembly or module headings. You can use backticks or other markup in the title for a block, such as a code block `.Example` or a table `.Description` title.
76-
* Do not use "Optional:" to prefix a heading title. According to IBM Style, this practice is reserved for optional steps and code callouts. 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)"].
77-
====
78-
81+
+
7982
After the heading block and a single whitespace line, you can include any content for this assembly.
8083

81-
[NOTE]
82-
====
83-
The assembly title, which is the first line of the document, is the only level 1 ( = ) title.
84-
Section headers within the assembly must be level 2 ( == ) or lower. When you include modules, you must add
85-
leveloffsets in the include statements. You can manually add more level 2 or lower section headers in the assembly.
86-
====
84+
<7> The table of contents for the current assembly.
8785

8886
[id="module-file-metadata"]
8987
== Module file metadata
@@ -101,26 +99,15 @@ Every module should be placed in the modules folder and should contain the follo
10199

102100
<1> List of assemblies in which this module is included.
103101
<2> The content type for the file. Replace `<TYPE>` with the actual type of the module, `CONCEPT`, `REFERENCE`, or `PROCEDURE`. Place this attribute before the anchor ID or, if present, the conditional that contains the anchor ID.
104-
<3> A module anchor with {context} that must be lowercase and must match the module's file name.
105-
<4> Human readable title. To ensure consistency in the results of the
106-
leveloffset values in include statements, you must use a level one heading
102+
<3> The anchor ID with `_{context}` must be lowercase and match the module's file name.
103+
<4> Human readable title. To ensure consistency in the results of the leveloffset values in include statements, you must use a level 1 heading
107104
( = ) for the module title.
108-
109-
Example:
110-
111-
----
112-
// Module included in the following assemblies:
113-
//
114-
// * cli_reference/openshift_cli/developer-cli-commands.adoc
115-
116-
:_mod-docs-content-type: REFERENCE
117-
[id="cli-basic-commands_{context}"]
118-
= Basic CLI commands
119-
----
120-
105+
+
121106
[NOTE]
122107
====
123-
Do not use backticks or other markup in assembly or module headings. You can use backticks or other markup in the title for a block, such as a code block `.Example` or a table `.Description` title.
108+
* Do not use backticks or other markup in module headings. You can use backticks or other markup in the title for a block, such as a code block `.Example` or a table `.Description` title.
109+
* Do not use "Optional:" to prefix a module title. According to IBM Style, this practice is reserved for optional steps and code callouts.
110+
* 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)"].
124111
====
125112

126113
[id="snippet-file-metadata"]

0 commit comments

Comments
 (0)