Skip to content

Commit 7ffd020

Browse files
authored
Merge pull request #47 from jhradilek/update-templates
Update the templates to match the official ones
2 parents ff34e5f + 9d98adb commit 7ffd020

File tree

4 files changed

+101
-117
lines changed

4 files changed

+101
-117
lines changed

templates/assembly.adoc

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
{% if metadata -%}
22
:_newdoc-version: {{generator_version}}
33
:_template-generated: {{current_day}}
4+
////
5+
Metadata attribute that will help enable correct parsing and conversion to the appropriate DITA topic type.
6+
////
7+
:_mod-docs-content-type: ASSEMBLY
48
{%- endif %}
9+
510
{% if !simplified -%}
611
////
712
Retains the context of the parent assembly if this assembly is nested within another assembly.
813
For more information about nesting assemblies, see: https://redhat-documentation.github.io/modular-docs/#nesting-assemblies
914
See also the complementary step on the last line of this file.
1015
////
11-
1216
ifdef::context[:parent-context-of-{{module_anchor}}: {context}]
1317
{%- endif %}
1418

@@ -18,19 +22,11 @@ Base the file name and the ID on the assembly title. For example:
1822
* ID: [id="assembly-my-user-story_{context}"]
1923
* Title: = My user story
2024

21-
The ID is an anchor that links to the module. Avoid changing it after the module has been published to ensure existing links are not broken. Include {context} in the ID so the assembly can be reused.
22-
////
25+
ID is a unique identifier that can be used to reference this assembly. Avoid changing it after the module has been published to ensure existing links are not broken. Include {context} in the ID so the assembly can be reused.
2326

27+
Be sure to include a line break between the title and the :context: variable and the :context: variable and the assembly introduction.
28+
If the assembly covers a task, start the title with a verb in the gerund form, such as Creating or Configuring.
2429
////
25-
Indicate the content type in one of the following
26-
ways:
27-
Add the prefix assembly- or assembly_ to the file name.
28-
Add the following attribute before the module ID:
29-
////
30-
{% if metadata -%}
31-
:_mod-docs-content-type: ASSEMBLY
32-
{%- endif %}
33-
3430
{% if simplified -%}
3531
[id="{{module_anchor}}"]
3632
{%- else -%}
@@ -42,20 +38,12 @@ ifdef::context[]
4238
endif::[]
4339
{%- endif %}
4440
= {{module_title}}
45-
////
46-
{% if !simplified -%}
47-
Be sure to include a line break between the title and the :context: variable and the :context: variable and the assembly introduction.
48-
49-
{% endif %}
50-
If the assembly covers a task, start the title with a verb in the gerund form, such as Creating or Configuring.
51-
////
5241
5342
{% if !simplified -%}
54-
:context: {{module_anchor}}
55-
5643
////
5744
The `context` attribute enables module reuse. Every module ID includes {context}, which ensures that the module has a unique ID so you can include it multiple times in the same guide.
5845
////
46+
:context: {{module_anchor}}
5947
{%- endif %}
6048
6149
{% if examples -%}
@@ -75,21 +63,16 @@ This paragraph is the assembly introduction. It explains what the user will acco
7563
////
7664
The following include statements pull in the module files that comprise the assembly. Include any combination of concept, procedure, or reference modules required to cover the user story. You can also include other assemblies.
7765
78-
include::modules/TEMPLATE_CONCEPT_explaining_a_concept.adoc[leveloffset=+1]
79-
////
80-
81-
{{include_statements}}
82-
83-
////
8466
[leveloffset=+1] ensures that when a module title is a level 1 heading (= Title), the heading will be interpreted as a level-2 heading (== Title) in the assembly. Use [leveloffset=+2] and [leveloffset=+3] to nest modules in an assembly.
8567
68+
Add a blank line after each 'include::' statement.
69+
8670
include::modules/TEMPLATE_PROCEDURE_doing_one_procedure.adoc[leveloffset=+2]
87-
// Add a blank line after each 'include::' statement.
8871
8972
include::modules/TEMPLATE_PROCEDURE_reference-material.adoc[leveloffset=2]
9073
////
74+
{{include_statements}}
9175
92-
[role="_additional-resources"]
9376
== Next steps
9477
9578
{% if examples -%}
@@ -98,14 +81,19 @@ include::modules/TEMPLATE_PROCEDURE_reference-material.adoc[leveloffset=2]
9881
* Use an unnumbered bullet (*) if the list includes only one step.
9982
{%- endif %}
10083
101-
// If the last module included in your assembly contains an Additional resources section as well, check the appearance of the rendered assembly. If the two Additional resources sections might be confusing for a reader, consider consolidating their content and removing one of them.
84+
////
85+
Optional. Delete if not used.
86+
87+
Provide a bulleted list of links and display text relevant to the assembly. These links can include `link:` and `xref:` macros. Do not include additional text.
88+
89+
If the last module included in your assembly contains an Additional resources section as well, check the appearance of the rendered assembly. If the two Additional resources sections might be confusing for a reader, consider consolidating their content and removing one of them.
90+
////
10291
[role="_additional-resources"]
10392
== Additional resources
10493
10594
{% if examples -%}
106-
* This section is optional.
107-
* Provide a bulleted list of links to other closely-related material. These links can include `link:` and `xref:` macros.
108-
* Use an unnumbered bullet (*) if the list includes only one step.
95+
* link:https://github.com/redhat-documentation/modular-docs#modular-documentation-reference-guide[Modular Documentation Reference Guide]
96+
* xref:some-module_{context}[]
10997
{%- endif %}
11098

11199
{% if !simplified -%}
@@ -114,4 +102,4 @@ Restore the context to what it was before this assembly.
114102
////
115103
ifdef::parent-context-of-{{module_anchor}}[:context: {parent-context-of-{{module_anchor}}}]
116104
ifndef::parent-context-of-{{module_anchor}}[:!context:]
117-
{%- endif %}
105+
{%- endif %}

templates/concept.adoc

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,32 @@
11
{% if metadata -%}
22
:_newdoc-version: {{generator_version}}
33
:_template-generated: {{current_day}}
4+
////
5+
Metadata attribute that will help enable correct parsing and conversion to the appropriate DITA topic type.
6+
////
7+
:_mod-docs-content-type: CONCEPT
48
{%- endif %}
9+
510
////
611
Base the file name and the ID on the module title. For example:
712
* file name: con_my-concept-module-a.adoc
813
* ID: [id="my-concept-module-a_{context}"]
914
* Title: = My concept module A
10-
////
11-
12-
////
13-
Indicate the module type in one of the following
14-
ways:
15-
Add the prefix con- or con_ to the file name.
16-
Add the following attribute before the module ID:
17-
////
18-
{% if metadata -%}
19-
:_mod-docs-content-type: CONCEPT
20-
{%- endif %}
2115

22-
////
23-
The ID is an anchor that links to the module. Avoid changing it after the module has been published to ensure existing links are not broken.
16+
ID is a unique identifier that can be used to reference this module. Avoid changing it after the module has been published to ensure existing links are not broken.
2417

2518
The `context` attribute enables module reuse. Every module ID includes {context}, which ensures that the module has a unique ID so you can include it multiple times in the same guide.
26-
////
2719

20+
Be sure to include a line break between the title and the module introduction.
21+
////
2822
{% if simplified -%}
2923
[id="{{module_anchor}}"]
3024
{%- else -%}
3125
[id="{{module_anchor}}_{context}"]
3226
{%- endif %}
3327
= {{module_title}}
3428
////
35-
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. Do not start the title of concept modules with a verb. See also _Wording of headings_ in _The IBM Style Guide_.
36-
37-
Be sure to include a line break between the title and the module introduction.
29+
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. Do not start the title of concept modules with a verb or gerund. See also _Wording of headings_ in _IBM Style_.
3830
////
3931

4032
{% if examples -%}
@@ -47,23 +39,29 @@ The contents of a concept module give the user descriptions and explanations nee
4739
* Avoid including action items. Action items belong in procedure modules. However, in some cases a concept or reference can include suggested actions when those actions are simple, are highly dependent on the context of the module, and have no place in any procedure module. In such cases, ensure that the heading of the concept or reference remains a noun phrase and not a gerund.
4840
4941
////
50-
Include titles and alternative text descriptions for images.
51-
Alternative text should provide a textual, complete description of the image as a full sentence.
42+
Do not include third-level headings (===).
43+
44+
Include titles and alternative text descriptions for images and enclose the descriptions in straight quotation marks (""). Alternative text should provide a textual, complete description of the image as a full sentence.
45+
5246
Images should never be the sole means of conveying information and should only supplement the text.
53-
Avoid screenshots or other images that might quickly go out of date and that create a maintenance burden on documentation.
54-
Provide text equivalents for every diagram, image, or other non-text element. Avoid using images of text instead of actual text.
47+
48+
Avoid screenshots or other images that might quickly go out of date and that create a maintenance burden on documentation. Provide text equivalents for every diagram, image, or other non-text element. Avoid using images of text instead of actual text.
49+
50+
Example image:
51+
52+
.Image title
53+
image::image-file.png["A textual representation of the essential information conveyed by the image."]
5554
////
56-
//.Image title
57-
//image::image-file.png[A textual representation of the essential information conveyed by the image.]
5855
{%- endif %}
5956

60-
[role="_additional-resources"]
61-
.Additional resources
6257
////
6358
Optional. Delete if not used.
59+
60+
Provide a bulleted list of links and display text relevant to the concept module. These links can include `link:` and `xref:` macros. Do not include additional text.
6461
////
62+
[role="_additional-resources"]
63+
.Additional resources
6564
{% if examples -%}
66-
* A bulleted list of links to other closely-related material. These links can include `link:` and `xref:` macros.
67-
* For more details on writing concept modules, see the link:https://github.com/redhat-documentation/modular-docs#modular-documentation-reference-guide[Modular Documentation Reference Guide].
68-
* Use a consistent system for file names, IDs, and titles. For tips, see _Anchor Names and File Names_ in link:https://github.com/redhat-documentation/modular-docs#modular-documentation-reference-guide[Modular Documentation Reference Guide].
69-
{%- endif %}
65+
* link:https://github.com/redhat-documentation/modular-docs#modular-documentation-reference-guide[Modular Documentation Reference Guide]
66+
* xref:some-module_{context}[]
67+
{%- endif %}

templates/procedure.adoc

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
{% if metadata -%}
22
:_newdoc-version: {{generator_version}}
33
:_template-generated: {{current_day}}
4+
////
5+
Metadata attribute that will help enable correct parsing and conversion to the appropriate DITA topic type.
6+
////
7+
:_mod-docs-content-type: PROCEDURE
48
{%- endif %}
9+
510
////
611
Base the file name and the ID on the module title. For example:
712
* file name: proc_doing-procedure-a.adoc
813
* ID: [id="doing-procedure-a_{context}"]
914
* Title: = Doing procedure A
1015

11-
The ID is an anchor that links 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 ID includes {context}, which ensures that the module has a unique ID even if it is reused multiple times in an assembly file.
16+
ID is a unique identifier that can be used to reference this module. Avoid changing it after the module has been published to ensure existing links are not broken.
1217

13-
Indicate the module type in one of the following
14-
ways:
15-
Add the prefix proc- or proc_ to the file name.
16-
Add the following attribute before the module ID:
17-
////
18-
{% if metadata -%}
19-
:_mod-docs-content-type: PROCEDURE
20-
{%- endif %}
18+
The `context` attribute enables module reuse. Every module ID includes {context}, which ensures that the module has a unique ID so you can include it multiple times in the same guide.
2119

20+
Be sure to include a line break between the title and the module introduction.
21+
////
2222
{% if simplified -%}
2323
[id="{{module_anchor}}"]
2424
{%- else -%}
@@ -34,59 +34,61 @@ Write a short introductory paragraph that provides an overview of the module. Th
3434
{%- endif %}
3535
3636
.Prerequisites
37-
3837
{% if examples -%}
3938
* A bulleted list of conditions that must be satisfied before the user starts the steps in this module.
4039
* Prerequisites can be full sentences or sentence fragments; however, prerequisite list items must be parallel.
40+
* Do not use imperative statements in the Prerequisites section.
4141
{%- endif %}
4242
43-
////
44-
If you have only one prerequisite, list it as a single bullet point.
45-
Do not write prerequisites in the imperative.
46-
You can include links to more information about the prerequisites.
47-
Delete the .Prerequisites section title and bullets if the module has no prerequisites.
48-
////
49-
5043
.Procedure
51-
5244
{% if examples -%}
5345
. Make each step an instruction.
54-
55-
. Include one command or action for each step with the exception of simple follow-step, for example:
46+
. Include one imperative sentence for each step, for example:
5647
.. Do this thing and then select *Next*.
57-
.. Do this other thing and then select *Next*.
58-
48+
.. Do this other thing, and this other thing, and then select *Next*.
5949
. Use an unnumbered bullet (*) if the procedure includes only one step.
50+
+
51+
NOTE: You can add text, tables, code examples, images, and other items to a step. However, these items must be connected to the step with a plus sign (+). Any items under the .Procedure heading and before one of the following approved headings that are not connected to the last step with a plus sign cannot be converted to DITA.
6052
{%- endif %}
6153
54+
////
55+
Only the following block headings can be reliably mapped to DITA: Prerequisites, Procedure, Verification, Troubleshooting, Troubleshooting steps, Next steps, Next step, Additional resources. They must appear in this order and, with the exception of Additional resources, are only allowed in a procedure module. You can also use block headings in figure, table, and example titles.
56+
////
6257
.Verification
63-
6458
{% if examples -%}
6559
Delete this section if it does not apply to your module. Provide the user with verification methods for the procedure, such as expected output or commands that confirm success or failure.
6660
6761
* Provide an example of expected command output or a pop-up window that the user receives when the procedure is successful.
6862
* List actions for the user to complete, such as entering a command, to determine the success or failure of the procedure.
6963
* Make each step an instruction.
70-
* Include one command or action per step.
7164
* Use an unnumbered bullet (*) if the verification includes only one step.
7265
{%- endif %}
7366
74-
[role="_additional-resources"]
75-
.Next steps
67+
.Troubleshooting
68+
{% if examples -%}
69+
Delete this section if it does not apply to your module. Provide the user with troubleshooting steps.
70+
71+
* Make each step an instruction.
72+
* Use an unnumbered bullet (*) if the troubleshooting includes only one step.
73+
{%- endif %}
7674
75+
.Next steps
7776
{% if examples -%}
78-
* This section is optional.
77+
* Delete this section if it does not apply to your module.
7978
* Provide a bulleted list of links that contain instructions that might be useful to the user after they complete this procedure.
8079
* Use an unnumbered bullet (*) if the list includes only one step.
8180
8281
NOTE: Do not use *Next steps* to provide a second list of instructions.
8382
{%- endif %}
8483
84+
////
85+
Optional. Delete if not used.
86+
87+
Provide a bulleted list of links and display text relevant to the procedure module. These links can include `link:` and `xref:` macros. Do not include additional text.
88+
////
8589
[role="_additional-resources"]
8690
.Additional resources
87-
8891
{% if examples -%}
89-
* This section is optional.
90-
* Provide a bulleted list of links to other closely-related material. These links can include `link:` and `xref:` macros.
91-
* Use an unnumbered bullet (*) if the list includes only one step.
92-
{%- endif %}
92+
* link:https://github.com/redhat-documentation/modular-docs#modular-documentation-reference-guide[Modular Documentation Reference Guide]
93+
* xref:some-module_{context}[]
94+
{%- endif %}

0 commit comments

Comments
 (0)