You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-30 19:23:04 +03:00
Allow documentation source file to be specified in manifest.
The help source file had previously been hardcoded and now that is no longer needed. A future commit will introduce more sources outside of the xml path.
This commit is contained in:
@ -104,12 +104,14 @@ sub new
|
|||||||
{
|
{
|
||||||
my $oSourceHash = {};
|
my $oSourceHash = {};
|
||||||
my $strKey = $oSource->paramGet('key');
|
my $strKey = $oSource->paramGet('key');
|
||||||
|
my $strFile = $oSource->paramGet('file', false);
|
||||||
my $strSourceType = $oSource->paramGet('type', false);
|
my $strSourceType = $oSource->paramGet('type', false);
|
||||||
|
|
||||||
logDebugMisc
|
logDebugMisc
|
||||||
(
|
(
|
||||||
$strOperation, 'load source',
|
$strOperation, 'load source',
|
||||||
{name => 'strKey', value => $strKey},
|
{name => 'strKey', value => $strKey},
|
||||||
|
{name => 'strFile', value => $strFile},
|
||||||
{name => 'strSourceType', value => $strSourceType}
|
{name => 'strSourceType', value => $strSourceType}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -119,10 +121,10 @@ sub new
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Help is in src/build/help
|
# If file is defined
|
||||||
if ($strKey eq 'help')
|
if (defined($strFile))
|
||||||
{
|
{
|
||||||
$oSourceHash->{doc} = new pgBackRestDoc::Common::Doc("$self->{strDocPath}/../src/build/help/${strKey}.xml");
|
$oSourceHash->{doc} = new pgBackRestDoc::Common::Doc($self->{strDocPath} . "/${strFile}");
|
||||||
}
|
}
|
||||||
# Else should be in doc/xml
|
# Else should be in doc/xml
|
||||||
else
|
else
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
<source key="index"/>
|
<source key="index"/>
|
||||||
<source key="user-guide-index"/>
|
<source key="user-guide-index"/>
|
||||||
<source key="user-guide"/>
|
<source key="user-guide"/>
|
||||||
<source key="help" type="custom"/>
|
<source key="help" type="custom" file="../src/build/help/help.xml"/>
|
||||||
<source key="release" type="custom"/>
|
<source key="release" type="custom"/>
|
||||||
<source key="faq"/>
|
<source key="faq"/>
|
||||||
<source key="metric"/>
|
<source key="metric"/>
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
<!ELEMENT source EMPTY>
|
<!ELEMENT source EMPTY>
|
||||||
<!ATTLIST source key CDATA #REQUIRED>
|
<!ATTLIST source key CDATA #REQUIRED>
|
||||||
<!ATTLIST source type CDATA "">
|
<!ATTLIST source type CDATA "">
|
||||||
|
<!ATTLIST source file CDATA "">
|
||||||
|
|
||||||
<!ELEMENT render-list (render+)>
|
<!ELEMENT render-list (render+)>
|
||||||
<!ELEMENT render (render-source+)>
|
<!ELEMENT render (render-source+)>
|
||||||
|
Reference in New Issue
Block a user