diff --git a/doc/lib/BackRestDoc/Custom/DocCustomRelease.pm b/doc/lib/BackRestDoc/Custom/DocCustomRelease.pm index 016a9d8a0..e80353b5d 100644 --- a/doc/lib/BackRestDoc/Custom/DocCustomRelease.pm +++ b/doc/lib/BackRestDoc/Custom/DocCustomRelease.pm @@ -282,6 +282,9 @@ sub docGet # Get the release version my $strVersion = $oRelease->paramGet('version'); + # Display versions in TOC? + my $bTOC = true; + # Create a release section if ($strVersion =~ /dev$/) { @@ -320,6 +323,7 @@ sub docGet } $iUnsupportedReleaseTotal++; + $bTOC = false; } # Format the date @@ -345,7 +349,7 @@ sub docGet } # Add section and titles - my $oReleaseSection = $oSection->nodeAdd('section', undef, {id => $strVersion}); + my $oReleaseSection = $oSection->nodeAdd('section', undef, {id => $strVersion, toc => !$bTOC ? 'n' : undef}); $oReleaseSection->paramSet(XML_SECTION_PARAM_ANCHOR, XML_SECTION_PARAM_ANCHOR_VALUE_NOINHERIT); $oReleaseSection->nodeAdd('title')->textSet( diff --git a/doc/lib/BackRestDoc/Html/DocHtmlPage.pm b/doc/lib/BackRestDoc/Html/DocHtmlPage.pm index 40b82bf0f..1c4770eff 100644 --- a/doc/lib/BackRestDoc/Html/DocHtmlPage.pm +++ b/doc/lib/BackRestDoc/Html/DocHtmlPage.pm @@ -161,7 +161,7 @@ sub process $oPageBody->add($oChildSectionElement); - if (defined($oPageTocBody)) + if (defined($oPageTocBody) && defined($oChildSectionTocElement)) { $oPageTocBody->add($oChildSectionTocElement); } @@ -456,7 +456,11 @@ sub sectionProcess $self->sectionProcess($oChild, $strAnchor, $iDepth + 1); $oSectionBodyElement->add($oChildSectionElement); - $oSectionTocElement->add($oChildSectionTocElement); + + if (defined($oChildSectionTocElement)) + { + $oSectionTocElement->add($oChildSectionTocElement); + } } # Check if the child can be processed by a parent else @@ -470,7 +474,7 @@ sub sectionProcess ( $strOperation, {name => 'oSectionElement', value => $oSectionElement, trace => true}, - {name => 'oSectionTocElement', value => $oSectionTocElement, trace => true} + {name => 'oSectionTocElement', value => $oSection->paramTest('toc', 'n') ? undef : $oSectionTocElement, trace => true} ); } diff --git a/doc/xml/release.xml b/doc/xml/release.xml index 82eb64054..e4092469b 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -161,6 +161,12 @@
Fixed minor documentation reproducibility issues related to binary paths.
+ +Suppress TOC for unsupported versions of