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
To optimize modular documentation, follow these guidelines for naming module anchors and files:
4
+
To optimize modular documentation, follow these guidelines for naming files and creating anchors:
5
5
6
-
Anchor names:: Provide an anchor in the format `+++[id="anchor-name_{context}"]+++` for every module so that it can be identified by Asciidoctor when reused or cross-referenced. `+++{context}+++` is a variable whose value you define in the assembly. Give the anchor the same or similar name as the module heading. Separate the words in the anchor with hyphens and use an underscore to separate the `+++{context}+++` part:
7
-
+
6
+
.File names
7
+
Assembly and module file names should accurately and closely reflect the title of the assembly or module. File names should have the format `prefix-filename.adoc` or `prefix_filename.adoc` where `prefix` is one of the following module prefixes:
* `proc-creating-guided-decision-tables.adoc` (Procedure module for creating)
17
+
* `proc-editing-guided-decision-tables.adoc` (Procedure module for editing)
18
+
* `ref-guided-decision-table-examples.adoc` (Reference module with examples)
19
+
* `ref-guided-decision-table-columns.adoc` (Reference module with column types)
20
+
* `assembly-designing-guided-decision-tables.adoc` (Assembly of guided decision table modules)
21
+
22
+
23
+
[NOTE]
24
+
====
25
+
Do not include special characters in file names. Ensure that all members of your team use the same file naming conventions.
26
+
====
27
+
28
+
These file naming guidelines are optional but highly recommended. However, if your team does not include the module prefixes in file names followed by either a hyphen (-) or an underscore (_), you must include one of the following variables in each concept, procedure, and reference module:
29
+
30
+
NOTE: This is a Pantheon 2 requirement.
31
+
32
+
[source]
33
+
----
34
+
:system-module-type: CONCEPT
35
+
:system-module-type: PROCEDURE
36
+
:system-module-type: REFERENCE
37
+
----
38
+
39
+
40
+
41
+
.Anchors
42
+
At the top of every module, provide an anchor in the format `+++[id="filename_{context}"]+++` where `filename` is the exact name of the file, without the file extension (`.adoc`). Module anchors are necessary so that the module can be identified by Asciidoctor when reused or cross-referenced. The `{context}` variable is intentionally not defined in the module anchor ID. You define a context value in each assembly, in the format `:context: my-context-value`. This enables the context variable in each module to be populated according to the relevant assembly.
8
43
--
9
44
[source]
10
45
----
11
-
[id="anchor-name_{context}"]
46
+
[id="filename_{context}"]
12
47
= Module Heading
13
48
14
49
The first sentence of the topic.
@@ -17,7 +52,8 @@ The first sentence of the topic.
17
52
.Example 1. Concept Module
18
53
[source]
19
54
----
20
-
[id="guided-decision-tables_{context}"]
55
+
[id="con-guided-decision-tables_{context}"]
56
+
21
57
= Guided Decision Tables
22
58
23
59
The guided decision tables feature works similarly to ...
@@ -26,7 +62,7 @@ The guided decision tables feature works similarly to ...
@@ -38,26 +74,8 @@ You can use guided decision tables to ...
38
74
The format defined here is recommended because it is the most stable and versatile of anchor formats, and supports variables that enable topics to be reused and cross-referenced properly. For details, see xref:reusing-modules[]. Other anchor formats include `+++[[anchor-name]]+++` and `+++[#anchor-name]+++`, but these formats either do not support variables for content reuse or do not support certain character types, such as periods. These limitations cause errors at build time.
39
75
====
40
76
41
-
NOTE: The underscore is recommended as the separator for `+++{context}+++`, because this facilitates tooling to distinguish the context part from the base anchor ID.
42
-
43
-
For more information about Asciidoc anchors, see the link:http://asciidoctor.org/docs/user-manual/#anchordef[Asciidoctor User Manual].
44
77
--
45
78
46
-
File names:: Give the module file the same name as the anchor used in it (which is the same as or similar to the module heading). Assembly and module file names should accurately and closely reflect the title of the assembly or module.
47
-
+
48
-
[NOTE]
49
-
====
50
-
Ensure that all members of your team use the same file naming conventions.
51
-
====
52
-
+
53
-
.Examples
54
-
* `guided-decision-tables.adoc` (Concept module)
55
-
* `creating-guided-decision-tables.adoc` (Procedure module for creating)
56
-
* `editing-guided-decision-tables.adoc` (Procedure module for editing)
57
-
* `guided-decision-table-examples.adoc` (Reference module with examples)
58
-
* `guided-decision-table-columns.adoc` (Reference module with column types)
59
-
* `designing-guided-decision-tables.adoc` (Assembly of guided decision table modules)
60
-
61
79
.Additional Resources
62
80
63
-
* The link:http://asciidoctor.org/docs/user-manual/#anchordef[Asciidoctor User Manual]
81
+
* link:https://asciidoctor.org/docs/user-manual/[Asciidoctor User Manual]
// Base the file name and the ID on the module title. For example:
6
-
// * file name: my-concept-module-a.adoc
7
-
// * ID: [id="my-concept-module-a_{context}"]
8
-
// * Title: = My concept module A
2
+
[id='using_text_snippets_or_text_fragments']
9
3
10
-
// The ID is used as an anchor for linking to the module. Avoid changing it after the module has been published to ensure existing links are not broken.
// The `context` attribute enables module reuse. Every module's ID includes a variable that sets the context, such as {context}, which ensures that the module has a unique ID even if it is reused multiple times in a guide.
13
4
= Text Snippets or Text Fragments (Pseudo-modules)
14
-
//In the title of concept modules, include nouns or noun phrases that are used in the body text. This helps readers and search engines find the information quickly.
15
-
//Do not start the title of concept modules with a verb. See also _Wording of headings_ in _The IBM Style Guide_.
5
+
16
6
17
7
[NOTE]
18
8
The following standard is recommended when the documentation is being maintained without a Content Management System (CMS) capable of managing complex interrelations between modules.
@@ -23,8 +13,3 @@ Snippet (fragment) file use should be limited to:
23
13
24
14
* Standardized admonitions (such as 'Technology preview' and 'Beta' text).
25
15
* Where there is an existing standard between the upstream and downstream communities.
26
-
27
-
28
-
//.Additional resources
29
-
30
-
//* A bulleted list of links to other material closely related to the contents of the concept module.
0 commit comments