:_content-type: PROCEDURE

[id="structuring-templates_{context}"]
= Structuring templates

To structure your templates, edit the settings in the `templates.yaml` configuration file.

.Prerequisites

* You have installed {name}.
* You have configured access to your tickets trackers.
* You have added tickets to your release notes project configuration.

.Procedure

. In your release notes project, open the `{bin-name}/templates.yaml` file in an editor.

. Edit the templates to organize your release notes in the rendered document:

** In a relatively small project with few release notes, you might want to continue organizing just by one property of release notes, such as just by doc type, just by component, or just by subsystem.
+
In this case, keep the `chapters` entry of the configuration file and edit the rules in it.

** In a relatively large project with many release notes, you might want to further divide your release notes by several properties, which results in several levels of nested sections. For example, you can organize by doc type at the base level and further divide each doc type chapter into subsections based on components.
+
In this case:

.. Add the `subsections` entry at the top of the configuration file, where you define the deeper levels of nested organization. This entry is described in xref:available-options-to-organize-release-notes_{context}[].
.. Edit the rules in the `chapters` entry of the configuration file. Include the organizing rules that you defined in the `subsections` entry. Use the YaML anchors syntax to include previously defined rules.

. Rebuild your release notes and examine the generated files in the `{bin-name}/generated/internal/` directory.

. Include the generated files in your `main-template.adoc` file.

.Verification

. Build an HTML preview of the internal document:
+
----
# asciidoctor --safe -vn internal.adoc
----

. Open the preview and check the document structure.


[role="_additional-resources"]
.Additional resources
* For a complete description of the syntax in the `templates.yaml` file, see xref:available-options-to-organize-release-notes_{context}[].
* For the process that creates AsciiDoc files from the template configuration, see xref:documentation-files-generated-from-templates_{context}[].
