Skip to content

Commit 10c1482

Browse files
authored
Merge pull request #121 from redhat-documentation/issues-109-111-115
Resolves Issues 109, 111, and 115
2 parents 197b298 + 1314cde commit 10c1482

File tree

2 files changed

+65
-31
lines changed

2 files changed

+65
-31
lines changed

modular-docs-manual/content/topics/introduction.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
[id="introduction"]
2-
= Introduction
1+
[id="introduction_{context}"]
2+
= Introduction to Modular Documentation
33

44
This manual provides instructions on how to author modularly structured documentation based on user stories. The manual defines used terminology, describes components that form modular documentation, and instructs writers on how to use provided templates to turn user stories into modular documentation.
55

Lines changed: 63 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,47 @@
1-
[id="anchor-and-file-names"]
2-
= Anchor Names and File Names
1+
[id="module_anchor-and-file-names-concept"]
2+
= File Names and Anchors
33

4-
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+
6+
.File names
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+
9+
* `con`: Concept module prefix
10+
* `proc`: Procedure module prefix
11+
* `ref`: Reference module prefix
12+
* `assembly`: Assembly module prefix
13+
14+
.Examples
15+
* `con-guided-decision-tables.adoc` (Concept module)
16+
* `con_guided-decision-tables.adoc` (Concept module)
17+
* `proc-creating-guided-decision-tables.adoc` (Procedure module for creating)
18+
* `proc_creating-guided-decision-tables.adoc` (Procedure module for creating)
19+
* `ref-guided-decision-table-examples.adoc` (Reference module with examples)
20+
* `ref_guided-decision-table-examples.adoc` (Reference module with examples)
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)
23+
24+
25+
[NOTE]
26+
====
27+
Do not include special characters in file names. Ensure that all members of your team use the same file naming conventions.
28+
====
29+
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 (_), include one of the following variables in each concept, procedure, and reference module:
531

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-
+
8-
--
932
[source]
1033
----
11-
[id="anchor-name_{context}"]
34+
:system-module-type: CONCEPT
35+
:system-module-type: PROCEDURE
36+
:system-module-type: REFERENCE
37+
----
38+
39+
.Anchors
40+
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.
41+
42+
[source]
43+
----
44+
[id="filename_{context}"]
1245
= Module Heading
1346
1447
The first sentence of the topic.
@@ -17,16 +50,35 @@ The first sentence of the topic.
1750
.Example 1. Concept Module
1851
[source]
1952
----
20-
[id="guided-decision-tables_{context}"]
53+
[id="con-guided-decision-tables_{context}"]
2154
= Guided Decision Tables
2255
2356
The guided decision tables feature works similarly to ...
2457
----
2558

26-
.Example 2. Procedure Module
59+
.Example 2. Concept Module
2760
[source]
2861
----
29-
[id="creating-guided-decision-tables_{context}"]
62+
[id="con_guided-decision-tables_{context}"]
63+
= Guided Decision Tables
64+
65+
The guided decision tables feature works similarly to ...
66+
----
67+
68+
69+
.Example 3. Procedure Module
70+
[source]
71+
----
72+
[id="proc-creating-guided-decision-tables_{context}"]
73+
= Creating Guided Decision Tables
74+
75+
You can use guided decision tables to ...
76+
----
77+
78+
.Example 4. Procedure Module
79+
[source]
80+
----
81+
[id="proc_creating-guided-decision-tables_{context}"]
3082
= Creating Guided Decision Tables
3183
3284
You can use guided decision tables to ...
@@ -38,26 +90,8 @@ You can use guided decision tables to ...
3890
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.
3991
====
4092

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-
--
4593

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)
6094

6195
.Additional Resources
6296

63-
* The link:http://asciidoctor.org/docs/user-manual/#anchordef[Asciidoctor User Manual]
97+
* link:https://asciidoctor.org/docs/user-manual/[Asciidoctor User Manual]

0 commit comments

Comments
 (0)