1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-10-30 23:37:45 +02:00

Doc engine improvements.

Bug Fixes:

* Fixed and issue that suppressed exceptions in PDF builds.

Features:

* Allow a source to be included as a section so large documents can be broken up.
* Added section link support to Markdown output.
* Added list support to PDF output.
* Added include option to explicitly build sources (complements the exclude option though both cannot be used in the same invocation).
* Added keyword-add option to add keywords without overriding the default keyword.
* Added debug option to doc.pl to easily add the debug keyword to documentation builds.
* Added pre option to doc.pl to easily add the pre keyword to documentation builds.

Refactoring:

* Improvements to markdown rendering.
* Remove code dependency on project variable, instead use title param.
This commit is contained in:
David Steele
2016-11-17 16:35:11 -05:00
parent 54b1a784b5
commit c9b49b0d7e
16 changed files with 203 additions and 35 deletions

View File

@@ -100,6 +100,9 @@ sub process
my $strLatex = $self->{oManifest}->variableReplace(fileStringRead($self->{strPreambleFile}), 'latex') . "\n";
# !!! Temp hack for underscores in filename
$strLatex =~ s/pgaudit\\\_doc/pgaudit\_doc/g;
foreach my $strPageId ($self->{oManifest}->renderOutList(RENDER_TYPE_PDF))
{
&log(INFO, " render out: ${strPageId}");
@@ -129,6 +132,10 @@ sub process
# Save the html page
$strLatex .= $oDocLatexSection->process();
}
else
{
confess $oException;
}
};
}

View File

@@ -71,8 +71,7 @@ sub process
my $strLatex;
# Initialize page
my $strTitle = "{[project]}" .
(defined($oPage->paramGet('title', false)) ? ' ' . $oPage->paramGet('title') : '');
my $strTitle = $oPage->paramGet('title');
my $strSubTitle = $oPage->paramGet('subtitle', false);
# Render sections
@@ -325,6 +324,18 @@ sub sectionProcess
$strLatex .= "\n" . $self->processText($oDescription) . "\n";
}
# Add a list
elsif ($oChild->nameGet() eq 'list')
{
$strLatex .= "\n\\begin{itemize}";
foreach my $oListItem ($oChild->nodeList())
{
$strLatex .= "\n \\item " . $self->processText($oListItem->textGet());
}
$strLatex .= "\n\\end{itemize}";
}
# Add/remove config options
elsif ($oChild->nameGet() eq 'backrest-config' || $oChild->nameGet() eq 'postgres-config')
{