Add TOC for release deliverables

With a large number of deliverables and different deliverable types, the
documentation output for a release series can get very long and it's not
always obvious that there are different groups of types if you scroll
all the way down.

This updates our deliverable extension to include a table of contents at
the top of the output to add convenient links to the different groups of
deliverables.

Change-Id: I3c55057320661f7167d44138941a07fd38c3c81f
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2019-03-27 08:30:44 -05:00
parent dfb831dff0
commit 284a6de2a3
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8

View File

@ -138,6 +138,13 @@ class DeliverableDirectiveBase(rst.Directive):
result,
)
else:
# Add table of contents for all deliverables
result.append('.. contents:: **Deliverables**', '<toc>')
result.append(' :local:', '<toc>')
result.append(' :backlinks: none', '<toc>')
result.append(' :depth: 1', '<toc>')
result.append('', '<toc>')
# Only the deliverables for the given series are
# shown. They are categorized by type, which we need to
# extract from the data.