////
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-of-{{module_id}}: {context}]

////
Base the file name and the ID on the assembly title. For example:
* file name: assembly-my-user-story.adoc
* ID: [id="assembly-my-user-story_{context}"]
* Title: = My user story

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.
////

////
Indicate the module type in one of the following
ways:
Add the prefix assembly- or assembly_ to the file name.
Add the following attribute before the module ID:
////
:_content-type: ASSEMBLY

ifndef::context[]
[id="{{module_id}}"]
endif::[]
ifdef::context[]
[id="{{module_id}}_{context}"]
endif::[]
= {{module_title}}
////
If the assembly covers a task, start the title with a verb in the gerund form, such as Creating or Configuring.
////

:context: {{module_id}}

////
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.
////

[role="_abstract"]
{% if examples -%}
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.
{%- endif %}

== Prerequisites

{% if examples -%}
* A bulleted list of conditions that must be satisfied before the user starts following this assembly.
* You can also link to other modules or assemblies the user must follow before starting this assembly.
* Delete the section title and bullets if the assembly has no prerequisites.
* X is installed. For information about installing X, see <link>.
* You can log in to X with administrator privileges.
{%- endif %}

////
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.

include::modules/TEMPLATE_CONCEPT_explaining_a_concept.adoc[leveloffset=+1]
////

{{include_statements}}

////
[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.

include::modules/TEMPLATE_PROCEDURE_doing_one_procedure.adoc[leveloffset=+2]

include::modules/TEMPLATE_PROCEDURE_reference-material.adoc[leveloffset=2]
////

[role="_additional-resources"]
== Additional resources (or Next steps)
////
Optional. Delete if not used.
////
{% if examples -%}
* A bulleted list of links to other closely-related material. These links can include `link:` and `xref:` macros.
* For more details on writing assemblies, see the link:https://github.com/redhat-documentation/modular-docs#modular-documentation-reference-guide[Modular Documentation Reference Guide].
* 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].
{%- endif %}

////
Restore the context to what it was before this assembly.
////
ifdef::parent-context-of-{{module_id}}[:context: {parent-context-of-{{module_id}}}]
ifndef::parent-context-of-{{module_id}}[:!context:]
