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: modular-docs-manual/content/topics/module_anchor-and-file-names-concept.adoc
+27-9Lines changed: 27 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
To optimize modular documentation, follow these guidelines for naming files and creating anchors:
5
5
6
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:
7
+
Create assembly and module file names that accurately and closely reflect the title of the assembly or module. Create file names with the format `prefix-filename.adoc` or `prefix_filename.adoc` where `prefix` is one of the following module prefixes:
8
8
9
9
* `con`: Concept module prefix
10
10
* `proc`: Procedure module prefix
@@ -13,11 +13,13 @@ Assembly and module file names should accurately and closely reflect the title o
* `proc-creating-guided-decision-tables.adoc` (Procedure module for creating)
17
-
* `proc-editing-guided-decision-tables.adoc` (Procedure module for editing)
18
+
* `proc_creating-guided-decision-tables.adoc` (Procedure module for creating)
18
19
* `ref-guided-decision-table-examples.adoc` (Reference module with examples)
19
-
* `ref-guided-decision-table-columns.adoc` (Reference module with column types)
20
+
* `ref_guided-decision-table-examples.adoc` (Reference module with examples)
20
21
* `assembly-designing-guided-decision-tables.adoc` (Assembly of guided decision table modules)
22
+
* `assembly_designing-guided-decision-tables.adoc` (Assembly of guided decision table modules)
21
23
22
24
23
25
[NOTE]
@@ -27,8 +29,6 @@ Do not include special characters in file names. Ensure that all members of your
27
29
28
30
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
31
30
-
NOTE: This is a Pantheon 2 requirement.
31
-
32
32
[source]
33
33
----
34
34
:system-module-type: CONCEPT
@@ -39,8 +39,8 @@ NOTE: This is a Pantheon 2 requirement.
39
39
40
40
41
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.
43
-
--
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 Asciidoctor can identify the module when the module is reused or cross-referenced. The `context` variable is defined in each assembly module, for example `:context: my-context-value`. When you build an assembly, the value of the `context` variable replaces `{context}` in each module anchor ID and appears in generated URL.
43
+
44
44
[source]
45
45
----
46
46
[id="filename_{context}"]
@@ -53,13 +53,22 @@ The first sentence of the topic.
53
53
[source]
54
54
----
55
55
[id="con-guided-decision-tables_{context}"]
56
+
= Guided Decision Tables
56
57
58
+
The guided decision tables feature works similarly to ...
59
+
----
60
+
61
+
.Example 2. Concept Module
62
+
[source]
63
+
----
64
+
[id="con_guided-decision-tables_{context}"]
57
65
= Guided Decision Tables
58
66
59
67
The guided decision tables feature works similarly to ...
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.
0 commit comments