Skip to content

Commit 335bd91

Browse files
committed
Issues-109-111-115 updated filenames
1 parent c6865c6 commit 335bd91

File tree

2 files changed

+47
-44
lines changed

2 files changed

+47
-44
lines changed
Lines changed: 45 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,49 @@
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:
55

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:
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+
* `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.
843
--
944
[source]
1045
----
11-
[id="anchor-name_{context}"]
46+
[id="filename_{context}"]
1247
= Module Heading
1348
1449
The first sentence of the topic.
@@ -17,7 +52,8 @@ The first sentence of the topic.
1752
.Example 1. Concept Module
1853
[source]
1954
----
20-
[id="guided-decision-tables_{context}"]
55+
[id="con-guided-decision-tables_{context}"]
56+
2157
= Guided Decision Tables
2258
2359
The guided decision tables feature works similarly to ...
@@ -26,7 +62,7 @@ The guided decision tables feature works similarly to ...
2662
.Example 2. Procedure Module
2763
[source]
2864
----
29-
[id="creating-guided-decision-tables_{context}"]
65+
[id="pro-creating-guided-decision-tables_{context}"]
3066
= Creating Guided Decision Tables
3167
3268
You can use guided decision tables to ...
@@ -38,26 +74,8 @@ You can use guided decision tables to ...
3874
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.
3975
====
4076

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].
4477
--
4578

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-
6179
.Additional Resources
6280

63-
* The link:http://asciidoctor.org/docs/user-manual/#anchordef[Asciidoctor User Manual]
81+
* link:https://asciidoctor.org/docs/user-manual/[Asciidoctor User Manual]
Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
1-
// Module included in the following assemblies:
2-
//
3-
// <List assemblies here, each on a new line>
41

5-
// 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']
93

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.
11-
[id="using_text_snippets_or_text_fragments_{context}"]
12-
// 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.
134
= 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+
166

177
[NOTE]
188
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:
2313

2414
* Standardized admonitions (such as 'Technology preview' and 'Beta' text).
2515
* 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

Comments
 (0)