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
+50-17Lines changed: 50 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,30 +20,33 @@ It is not necessary to update existing content to unwrap lines, but you can remo
20
20
In the Atom editor, you can use `Ctrl`+`J` to undo hard wrapping on a paragraph.
21
21
====
22
22
23
+
[id="assembly-file-metadata"]
23
24
== Assembly file metadata
24
25
Every assembly file should contain the following metadata at the top, with no line spacing in between, except where noted:
25
26
26
27
----
27
-
[id="<unique-heading-for-assembly>"] <1>
28
-
= Assembly title <2>
29
-
include::modules/common-attributes.adoc[] <3>
30
-
:context: <unique-context-for-assembly> <4>
31
-
<5>
32
-
toc::[] <6>
28
+
:_content-type: ASSEMBLY <1>
29
+
[id="<unique-heading-for-assembly>"] <2>
30
+
= Assembly title <3>
31
+
include::modules/common-attributes.adoc[] <4>
32
+
:context: <unique-context-for-assembly> <5>
33
+
<6>
34
+
toc::[] <7>
33
35
----
34
36
35
-
<1> A unique (within OpenShift docs) anchor id for this assembly. Use lowercase. Example: cli-developer-commands
36
-
<2> Human readable title (notice the '=' top-level header)
37
-
<3> Includes attributes common to OpenShift docs.
37
+
<1> The content type for the file. For assemblies, always use `:_content-type: ASSEMBLY`. Place this attribute before the anchor ID or, if present, the conditional that contains the anchor ID.
38
+
<2> A unique (within OpenShift docs) anchor ID for this assembly. Use lowercase. Example: cli-developer-commands
39
+
<3> Human readable title (notice the '=' top-level header)
40
+
<4> Includes attributes common to OpenShift docs.
38
41
+
39
42
[NOTE]
40
43
====
41
44
The `{product-name}` and `{product-version}` common attributes are not defined in the `modules/common-attributes.adoc` file. Those attributes are pulled by AsciiBinder from the distro mapping definitions in the https://github.com/openshift/openshift-docs/blob/main/_distro_map.yml[_distro_map.yml] file. See xref:product-name-and-version[Product name and version] for more information on this topic.
42
45
====
43
46
+
44
-
<4> Context used for identifying headers in modules that is the same as the anchor id. Example: cli-developer-commands.
45
-
<5> A blank line. You *must* have a blank line here before the toc.
46
-
<6> The table of contents for the current assembly.
47
+
<5> Context used for identifying headers in modules that is the same as the anchor ID. Example: cli-developer-commands.
48
+
<6> A blank line. You *must* have a blank line here before the toc.
49
+
<7> The table of contents for the current assembly.
47
50
48
51
After the heading block and a single whitespace line, you can include any content for this assembly.
49
52
@@ -54,6 +57,7 @@ Section headers within the assembly must be level 2 ( == ) or lower. When you in
54
57
leveloffsets in the include statements. You can manually add more level 2 or lower section headers in the assembly.
55
58
====
56
59
60
+
[id="module-file-metadata"]
57
61
== Module file metadata
58
62
Every module should be placed in the modules folder and should contain the following metadata at the top:
59
63
@@ -62,13 +66,15 @@ Every module should be placed in the modules folder and should contain the follo
62
66
//
63
67
// * list of assemblies where this module is included <1>
64
68
65
-
[id="<module-anchor>_{context}"] <2>
66
-
= Module title <3>
69
+
:_content-type: <TYPE> <2>
70
+
[id="<module-anchor>_{context}"] <3>
71
+
= Module title <4>
67
72
----
68
73
69
-
<1> List of assemblies in which this module is included.
70
-
<2> A module anchor with {context} that must be lowercase and must match the module's file name.
71
-
<3> Human readable title. To ensure consistency in the results of the
74
+
<1> 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.
75
+
<2> List of assemblies in which this module is included.
76
+
<3> A module anchor with {context} that must be lowercase and must match the module's file name.
77
+
<4> Human readable title. To ensure consistency in the results of the
72
78
leveloffset values in include statements, you must use a level one heading
Every text snippet should be placed in the snippets folder and should contain the following metadata at the top:
88
96
@@ -94,9 +102,12 @@ Every text snippet should be placed in the snippets folder and should contain th
94
102
// Text snippet included in the following modules: <2>
95
103
//
96
104
// * list of modules where this text snippet is included
105
+
106
+
:_content-type: SNIPPET <3>
97
107
----
98
108
<1> List of assemblies in which this text snippet is included.
99
109
<2> List of modules in which this text snippet is included.
110
+
<1> The content type for the file. For snippets, always use `:_content-type: SNIPPET`. Place this attribute before the anchor ID, the conditional that contains the anchor ID, or the first line of body text.
In {product-title} version {product-version}, you can install a cluster on {cloud-provider-first} ({cloud-provider}) that uses the default configuration options.
116
128
----
117
129
130
+
== Content type attributes
131
+
132
+
Each `.adoc` file must contain a `:_content-type:` attribute in its metadata that indicates its file type. This information is used by some publication processes to sort and label files.
133
+
134
+
Add the attribute from the following list that corresponds to your file type:
135
+
136
+
* `:_content-type: ASSEMBLY`
137
+
* `:_content-type: CONCEPT`
138
+
* `:_content-type: PROCEDURE`
139
+
* `:_content-type: REFERENCE`
140
+
* `:_content-type: SNIPPET`
141
+
142
+
Place the attribute in the file metadata. The following list describes the best attribute placement options:
143
+
144
+
. Directly before the first anchor ID in a file
145
+
. If the first anchor ID is enclosed in a conditional, before the conditional
146
+
. Between the list of assemblies in which this module is included and the first line of body text
147
+
148
+
The metadata examples contain sample placement for each file type, xref:assembly-file-metadata[assembly], xref:module-file-metadata[module], and xref:snippet-file-metadata[snippet].
149
+
118
150
== Assembly/module file names
119
151
120
152
Try to shorten the file name as much as possible _without_ abbreviating important terms that may cause confusion. For example, the `managing-authorization-policies.adoc` file name would be appropriate for an assembly titled "Managing Authorization Policies".
@@ -147,6 +179,7 @@ For example, if you are creating the links in a directory that is two levels dee
147
179
----
148
180
$ ln -s ../../images/ images
149
181
$ ln -s ../../modules/ modules
182
+
$ ln -s ../../snippets/ snippets
150
183
----
151
184
+
152
185
Be sure to adjust the number of levels to back up (`../`) depending on how deep your directory is.
0 commit comments