pgbackrest.git / summary / log / commit / refs

commit    56ee666e69302b291ec5cc7d04caa25c651d7bfb
Author:   David Steele <david@pgmasters.net>
Date:     Sun Sep 04 13:27:56 2016 +0000

    Suppress TOC for unsupported versions of pgBackRest.
    
    The intent is to tidy the releases page and nobody should care much about the old, unsupported releases,


doc/lib/BackRestDoc/Custom/DocCustomRelease.pm | 6 +++++- doc/lib/BackRestDoc/Html/DocHtmlPage.pm | 10 +++++++--- doc/xml/release.xml | 6 ++++++ 3 files changed, 18 insertions(+), 4 deletions(-) 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 @@ <p>Fixed minor documentation reproducibility issues related to binary paths.</p> </release-item> </release-bug-list> + + <release-refactor-list> + <release-item> + <p>Suppress TOC for unsupported versions of <backrest/>.</p> + </release-item> + </release-refactor-list> </release-doc-list> </release> [parent: 8f61473955e2]