ansible-hardening/doc/metadata/template_toc_rhel7.j2
Major Hayden 3fdc656721 Initial docs scaffolding for RHEL 7 STIG
This patch updates the documentation and the sphinx extension to
write the docs for the RHEL 7 STIG content. The RHEL 7 content
is still hidden for now since it will be under active development
for a while.

Special note:
There are some typos in version 0.2 of the XML for the STIG and those
typos exist in the automatically generated documentation, too.
A new version of the STIG XML is due out very soon which should
correct these.

Implements: bp/security-rhel7-stig
Change-Id: I70dcebdd45ca65e5ae7734c19ee8523fba581e18
2016-10-05 20:02:48 +00:00

32 lines
789 B
Django/Jinja

{% set page_title = "STIG Controls by " + toc_type | title %}
{{ "=" * page_title | length }}
{{ page_title }}
{{ "=" * page_title | length }}
.. contents::
:depth: 2
:backlinks: none
{% for section_header, stig_id_list in stig_dict.items() %}
{% if toc_type == 'tag' %}
{% set section_title = section_header + " (" + stig_id_list | length | string + " controls)" %}
{% else %}
{% set section_title = section_header | title + " (" + stig_id_list | length | string + " controls)" %}
{% endif %}
.. _{{ toc_type | replace(' ', '-') }}-{{ section_header | replace(' ', '-') }}:
{{ section_title }}
{{ "=" * section_title | length }}
{% for stig_id in stig_id_list | sort %}
{% include "template_doc_rhel7.j2" %}
{% if not loop.last %}
----
{% endif %}
{% endfor %}
{% endfor %}