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
+30-3
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ Every assembly file should contain the following metadata at the top, with no li
28
28
:_content-type: ASSEMBLY <1>
29
29
[id="<unique-heading-for-assembly>"] <2>
30
30
= Assembly title <3>
31
-
include::modules/common-attributes.adoc[] <4>
31
+
include::_attributes/common-attributes.adoc[] <4>
32
32
:context: <unique-context-for-assembly> <5>
33
33
<6>
34
34
toc::[] <7>
@@ -41,7 +41,7 @@ toc::[] <7>
41
41
+
42
42
[NOTE]
43
43
====
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.
44
+
The `{product-name}` and `{product-version}` common attributes are not defined in the `_attributes/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] and xref:attribute-files[attribute files] for more information on this topic.
45
45
====
46
46
+
47
47
<5> Context used for identifying headers in modules that is the same as the anchor ID. Example: cli-developer-commands.
@@ -147,6 +147,33 @@ Place the attribute in the file metadata. The following list describes the best
147
147
148
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
149
150
+
[id="attribute-files"]
151
+
== Attribute files
152
+
153
+
All attribute files must be placed in the `_attributes` directory. In most cases involving OpenShift Container Platform or OKD, add attributes to the `common-attributes.adoc` file instead of creating or using a separate attributes file. Before you add an attribute, review the contents of the `common-attributes.adoc` file to ensure that it is not already defined.
154
+
155
+
[IMPORTANT]
156
+
====
157
+
If you think that you need a separate attributes file, check with the docs team before you create it.
158
+
====
159
+
160
+
It is acceptable to group related attributes in the `common-attributes.adoc` file under a comment, as shown in the following example:
161
+
162
+
----
163
+
//gitops
164
+
:gitops-title: Red Hat OpenShift GitOps
165
+
:gitops-shortname: GitOps
166
+
----
167
+
168
+
It is also acceptable to enclose attributes in a xref:product-name-and-version[distro-based] conditional. The following example shows how to set a different value for the `:op-system-base:` attribute for OKD:
169
+
170
+
----
171
+
:op-system-base: RHEL
172
+
ifdef::openshift-origin[]
173
+
:op-system-base: Fedora
174
+
endif::[]
175
+
----
176
+
150
177
== Assembly/module file names
151
178
152
179
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".
@@ -455,7 +482,7 @@ If it makes more sense in context to refer to the major version of the product i
455
482
456
483
[NOTE]
457
484
====
458
-
Other common attribute values are defined in the `modules/common-attributes.adoc` file. Where possible, generalize references to those values by using the common attributes. For example, use `{console-redhat-com}` to refer to Red Hat OpenShift Cluster Manager.
485
+
Other common attribute values are defined in the `_attributes/common-attributes.adoc` file. Where possible, generalize references to those values by using the common attributes. For example, use `{console-redhat-com}` to refer to Red Hat OpenShift Cluster Manager. If you need to add an attribute to the `_attributes/common-attributes.adoc` file, open a pull request to add it to the attribute list. Do not create a separate attributes file without first consulting the docs team.
0 commit comments