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
+61Lines changed: 61 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,38 @@ Example:
85
85
= Basic CLI commands
86
86
----
87
87
88
+
== Text snippet file metadata
89
+
Every text snippet should be placed in the snippets folder and should contain the following metadata at the top:
90
+
91
+
----
92
+
// Text snippet included in the following assemblies: <1>
93
+
//
94
+
// * list of assemblies where this text snippet is included
95
+
//
96
+
// Text snippet included in the following modules: <2>
97
+
//
98
+
// * list of modules where this text snippet is included
99
+
----
100
+
<1> List of assemblies in which this text snippet is included.
101
+
<2> List of modules in which this text snippet is included.
102
+
103
+
[NOTE]
104
+
====
105
+
An anchor ID and human readable title are not required metadata. This type of component is text only and not intended to be published or cross referenced on its own. See <<writing-text-snippets>>.
106
+
====
107
+
108
+
Example:
109
+
110
+
----
111
+
// Text snippet included in the following assemblies:
In {product-title} version {product-version}, you can install a cluster on {cloud-provider-first} ({cloud-provider}) that uses the default configuration options.
118
+
----
119
+
88
120
== Assembly/module file names
89
121
90
122
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".
@@ -97,6 +129,7 @@ When creating a new directory or subdirectory, you must create two symbolic link
97
129
98
130
* An `images` symbolic link to the top-level `images/` directory
99
131
* A `modules` symbolic link to the top-level `modules/` directory
132
+
* If you are including a text snippet in your modules or assemblies, a `snippets` symbolic link to the top-level `snippets/` directory
100
133
101
134
If the directory that contains an assembly does not have the `images` symbolic link, any images in that assembly or its modules will not be included properly when building the docs.
When needed, use `.Prerequisites`, `.Next steps`, or `.Additional resources` syntax to suppress TOC formatting within a module. Do not use `==` syntax for these headings in modules. Because you cannot use the xrefs in modules, if you need to include a link under one of these headings, place the entire subsection in the assembly instead.
260
293
====
261
294
295
+
[id="writing-text-snippets"]
296
+
== Writing text snippets
297
+
A _text snippet_ is an optional component that lets you reuse content in multiple modules and assemblies. Text snippets are not a substitute for modules, but instead are a more granular form of content reuse. While a module is content that a reader can understand on its own (like an article) or as part of a larger body of work (like an assembly), a text snippet is not self-contained and is not intended to be published or cross referenced on its own.
298
+
299
+
In the context of modules and assemblies, text snippets do not include headings or anchor IDs. This type of component is text only. Examples include the following:
300
+
301
+
* Admonitions that appear in multiple modules.
302
+
* An introductory paragraph that appears in multiple assemblies.
303
+
* The same series of steps that appear in multiple procedure modules.
304
+
* A deprecation statement that appears in multiple sets of release notes.
305
+
306
+
Example:
307
+
308
+
You could write the the following paragraph once and include it in each assembly that explains how to install a cluster using the installer-provisioned default values:
309
+
310
+
[source,text]
311
+
----
312
+
In {product-title} version {product-version}, you can install a cluster on {cloud-provider-first} ({cloud-provider}) that uses the default configuration options.
313
+
----
314
+
315
+
[NOTE]
316
+
====
317
+
In the example, `cloud-provider-first` and `cloud-provider` are not defined by the `common-attributes` module. If you use an attribute that is not common to OpenShift docs, make sure to define it locally in either the assembly or module, depending on where the text snippet is included.
318
+
====
319
+
320
+
For more information about creating text snippets, see the
321
+
link:https://redhat-documentation.github.io/modular-docs/#using-text-snippets[Red Hat modular docs reference guide]
0 commit comments