Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add substitution strings for the templates to be directly usable by the newdoc script #83

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
// Retains the context of the parent assembly if this assembly is nested within another assembly.
// For more information about nesting assemblies, see: https://redhat-documentation.github.io/modular-docs/#nesting-assemblies
// See also the complementary step on the last line of this file.
ifdef::context[:parent-context: {context}]
ifdef::context[:parent-context-of-${module_id}: {context}]

// Base the file name and the ID on the assembly title. For example:
// * file name: my-assembly-a.adoc
// * ID: [id='my-assembly-a']
// * Title: = My assembly A

// 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.
[id='a-collection-of-modules']
// If the assembly is reused in other assemblies in a guide, include {context} in the ID: [id='a-collection-of-modules-{context}'].
= A collection of modules
[id='${module_id}']
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure here: Do we want to default to assembly IDs having context or not? Alternatively, should I add an ifdef statement to take care of the two scenarios automatically?

// If the assembly is reused in other assemblies in a guide, include {context} in the ID: [id='${module_id}_{context}'].
= ${module_title}
//If the assembly covers a task, start the title with a verb in the gerund form, such as Creating or Configuring.
:context: assembly-keyword
:context: ${module_id}
// The `context` attribute enables module reuse. Every module's ID includes {context}, which ensures that the module has a unique ID even if it is reused multiple times in a guide.

This paragraph is the assembly introduction. It explains what the user will accomplish by working through the modules in the assembly and sets the context for the user story the assembly is based on. Can include more than one paragraph. Consider using the information from the user story.
Expand All @@ -42,5 +42,5 @@ include::modules/TEMPLATE_PROCEDURE_doing_one_procedure.adoc[leveloffset=+1]
* 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].

// Restore the context to what it was before this assembly.
ifdef::parent-context[:context: {parent-context}]
ifndef::parent-context[:!context:]
ifdef::parent-context-of-${module_id}[:context: {parent-context-of-${module_id}}]
ifndef::parent-context-of-${module_id}[:!context:]
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
// * Title: = My concept module A

// 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.
[id='concept-explanation-{context}']
[id='${module_id}_{context}']
// The `context` attribute enables module reuse. Every module's ID includes {context}, which ensures that the module has a unique ID even if it is reused multiple times in a guide.
= Concept explanation
= ${module_title}
//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_.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
// * Title: = Doing procedure A

// 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.
[id='doing-one-procedure_{context}']
[id='${module_id}_{context}']
// The `context` attribute enables module reuse. Every module's ID includes {context}, which ensures that the module has a unique ID even if it is reused multiple times in a guide.
= Doing one procedure
= ${module_title}
// Start the title of a procedure module with a verb, such as Creating or Create. See also _Wording of headings_ in _The IBM Style Guide_.

This paragraph is the procedure module introduction: a short description of the procedure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
// * Title: = My reference A

// 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.
[id='reference-material_{context}']
[id='${module_id}_{context}']
// The `context` attribute enables module reuse. Every module's ID includes {context}, which ensures that the module has a unique ID even if it is reused multiple times in a guide.
= Reference material
= ${module_title}
//In the title of a reference module, include nouns that are used in the body text. For example, "Keyboard shortcuts for ___" or "Command options for ___." This helps readers and search engines find the information quickly.

A short introductory paragraph is required for the reference module.
Expand Down