mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
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,
This commit is contained in:
parent
8f61473955
commit
56ee666e69
@ -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(
|
||||
|
@ -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}
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user