You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-10-23 21:28:56 +03:00
Add support for sponsors in the documentation.
This allows logos to be displayed for sponsors in HTML on the homepage. The markdown will continue to list sponsors in text but the list will be pulled from the new XML.
This commit is contained in:
10
README.md
10
README.md
@@ -110,8 +110,14 @@ pgBackRest is completely free and open source under the [MIT](https://github.com
|
||||
|
||||
Creating a robust disaster recovery policy with proper replication and backup strategies can be a very complex and daunting task. You may find that you need help during the architecture phase and ongoing support to ensure that your enterprise continues running smoothly. There are a variety of PostgreSQL support companies that can provide this service.
|
||||
|
||||
## Sponsorship
|
||||
|
||||
pgBackRest would not exist without sponsors. Writing new features, fixing bugs, reviewing contributions, answering questions from the community, and maintenance all take a considerable amount of time. Please consider a [sponsorship](https://github.com/sponsors/dwsteele) if you use pgBackRest in your enterprise.
|
||||
|
||||
Current sponsors: [Supabase](https://supabase.com).
|
||||
|
||||
Past sponsors: [Crunchy Data](https://crunchydata.com), [Resonate](https://resonate.com).
|
||||
|
||||
## Recognition
|
||||
|
||||
[Crunchy Data](http://www.crunchydata.com) and [Resonate](http://www.resonate.com) have both generously supported the development of pgBackRest.
|
||||
|
||||
[Armchair](https://thenounproject.com/icon/armchair-129971) graphic by [Alexander Skowalsky](https://thenounproject.com/sandorsz).
|
||||
|
||||
@@ -35,6 +35,10 @@ to:
|
||||
pgbackrest/test/test.pl --code-count
|
||||
```
|
||||
|
||||
## Update sponsors
|
||||
|
||||
Add new sponsors and move to past sponsors when sponsorship has lapsed.
|
||||
|
||||
## Build release documentation
|
||||
```
|
||||
pgbackrest/doc/release.pl --build
|
||||
|
||||
@@ -339,6 +339,7 @@ eval
|
||||
"${strBasePath}/resource/html/" . $oManifest->variableGet('project-favicon') : undef,
|
||||
defined($oManifest->variableGet('project-logo')) ?
|
||||
"${strBasePath}/resource/" . $oManifest->variableGet('project-logo') : undef,
|
||||
"${strBasePath}/resource/sponsor",
|
||||
!$bNoExe
|
||||
);
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@ use constant HTML_PRE => 'pre';
|
||||
push @EXPORT, qw(HTML_PRE);
|
||||
use constant HTML_DIV => 'div';
|
||||
push @EXPORT, qw(HTML_DIV);
|
||||
use constant HTML_IMG => 'img';
|
||||
push @EXPORT, qw(HTML_IMG);
|
||||
use constant HTML_SPAN => 'span';
|
||||
push @EXPORT, qw(HTML_SPAN);
|
||||
use constant HTML_TABLE => 'table';
|
||||
|
||||
@@ -499,6 +499,21 @@ sub sectionProcess
|
||||
$oList->addNew(HTML_LI, 'list-unordered', {strContent => $self->processText($oListItem->textGet())});
|
||||
}
|
||||
}
|
||||
# Add a sponsor list
|
||||
elsif ($oChild->nameGet() eq 'sponsor-list')
|
||||
{
|
||||
my $oSponsorList = $oSectionBodyElement->addNew(HTML_DIV, "sponsor-list");
|
||||
|
||||
foreach my $oSponsor ($oChild->nodeList())
|
||||
{
|
||||
my $oSponsorLink = $oSponsorList->addNew(
|
||||
HTML_DIV, "sponsor")->addNew(HTML_A, undef, {strRef => $oSponsor->paramGet('url')});
|
||||
$oSponsorLink->addNew(
|
||||
HTML_IMG, "sponsor-img",
|
||||
{strExtra => 'src="sponsor/' . $oSponsor->paramGet('img') . '" alt="' . $oSponsor->valueGet() . '"'});
|
||||
$oSponsorLink->addNew(HTML_DIV, "sponsor-title", {strContent => $oSponsor->valueGet()});
|
||||
}
|
||||
}
|
||||
# Add a subtitle
|
||||
elsif ($oChild->nameGet() eq 'subtitle')
|
||||
{
|
||||
|
||||
@@ -47,6 +47,7 @@ sub new
|
||||
$self->{strCssFile},
|
||||
$self->{strFaviconFile},
|
||||
$self->{strProjectLogoFile},
|
||||
$self->{strSponsorPath},
|
||||
$self->{bExe}
|
||||
) =
|
||||
logDebugParam
|
||||
@@ -58,6 +59,7 @@ sub new
|
||||
{name => 'strCssFile'},
|
||||
{name => 'strFaviconFile', required => false},
|
||||
{name => 'strProjectLogoFile', required => false},
|
||||
{name => 'strSponsorPath'},
|
||||
{name => 'bExe'}
|
||||
);
|
||||
|
||||
@@ -110,6 +112,21 @@ sub process
|
||||
copy($self->{strProjectLogoFile}, $strProjectLogoFileDestination)
|
||||
or confess &log(ERROR, "unable to copy $self->{strProjectLogoFile} to ${strProjectLogoFileDestination}");
|
||||
}
|
||||
|
||||
# Copy sponsor logos
|
||||
my $strSponsorDestinationPath = "$self->{strHtmlPath}/sponsor";
|
||||
my @strySponsorList = $self->{oManifest}->storage()->list($self->{strSponsorPath});
|
||||
|
||||
$self->{oManifest}->storage()->pathCreate($strSponsorDestinationPath, {bIgnoreExists => true});
|
||||
|
||||
foreach my $strSponsor (@strySponsorList)
|
||||
{
|
||||
next if $strSponsor eq '.';
|
||||
|
||||
copy("$self->{strSponsorPath}/${strSponsor}", "${strSponsorDestinationPath}/${strSponsor}")
|
||||
or confess &log(
|
||||
ERROR, "unable to copy $self->{strSponsorPath}/${strSponsor} to ${strSponsorDestinationPath}/${strSponsor}");
|
||||
}
|
||||
}
|
||||
|
||||
foreach my $strPageId ($self->{oManifest}->renderOutList(RENDER_TYPE_HTML))
|
||||
|
||||
@@ -251,6 +251,28 @@ sub sectionProcess
|
||||
$strMarkdown .= "\n\n- " . $self->processText($oListItem->textGet());
|
||||
}
|
||||
}
|
||||
# Add a sponsor list
|
||||
elsif ($oChild->nameGet() eq 'sponsor-list')
|
||||
{
|
||||
my $bFirst = true;
|
||||
|
||||
foreach my $oSponsor ($oChild->nodeList())
|
||||
{
|
||||
if ($bFirst)
|
||||
{
|
||||
$strMarkdown .= ' ';
|
||||
$bFirst = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$strMarkdown .= ', ';
|
||||
}
|
||||
|
||||
$strMarkdown .= '[' . $oSponsor->valueGet() . '](' . $oSponsor->paramGet('url') . ')';
|
||||
}
|
||||
|
||||
$strMarkdown .= '.';
|
||||
}
|
||||
# Add a subsection
|
||||
elsif ($oChild->nameGet() eq 'section')
|
||||
{
|
||||
|
||||
@@ -282,7 +282,7 @@ eval
|
||||
&log(INFO, '...Deploy to repository');
|
||||
executeTest("rm -rf ${strDeployPath}/prior/${strVersion}");
|
||||
executeTest("mkdir ${strDeployPath}/prior/${strVersion}");
|
||||
executeTest("cp ${strDocHtml}/* ${strDeployPath}/prior/${strVersion}");
|
||||
executeTest("cp -r ${strDocHtml}/* ${strDeployPath}/prior/${strVersion}");
|
||||
|
||||
# Generate docs for the main website
|
||||
if (!$bDev)
|
||||
@@ -297,7 +297,7 @@ eval
|
||||
&log(INFO, '...Deploy to repository');
|
||||
executeTest("rm -rf ${strDeployPath}/dev");
|
||||
executeTest("find ${strDeployPath} -maxdepth 1 -type f -exec rm {} +");
|
||||
executeTest("cp ${strDocHtml}/* ${strDeployPath}");
|
||||
executeTest("cp -r ${strDocHtml}/* ${strDeployPath}");
|
||||
executeTest("cp ${strDocPath}/../README.md ${strDeployPath}");
|
||||
executeTest("cp ${strDocPath}/../LICENSE ${strDeployPath}");
|
||||
}
|
||||
|
||||
@@ -564,6 +564,34 @@ li.list-unordered
|
||||
margin-top: .5em;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
Sponsor
|
||||
*******************************************************************************/
|
||||
.sponsor-list
|
||||
{
|
||||
overflow: hidden;
|
||||
margin-bottom: 1.5em;
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
|
||||
.sponsor
|
||||
{
|
||||
float:left;
|
||||
text-align: center;
|
||||
margin-top: 1.5em;
|
||||
margin-left: 1.5em;
|
||||
}
|
||||
|
||||
.sponsor-img
|
||||
{
|
||||
width: 75px;
|
||||
}
|
||||
|
||||
.sponsor-title
|
||||
{
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
Admonition
|
||||
*******************************************************************************/
|
||||
|
||||
15
doc/resource/sponsor/supabase.svg
Normal file
15
doc/resource/sponsor/supabase.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<svg width="109" height="113" viewBox="0 0 109 113" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0627L99.1935 40.0627C107.384 40.0627 111.952 49.5228 106.859 55.9374L63.7076 110.284Z" fill="url(#paint0_linear)"/>
|
||||
<path d="M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0627L99.1935 40.0627C107.384 40.0627 111.952 49.5228 106.859 55.9374L63.7076 110.284Z" fill="url(#paint1_linear)" fill-opacity="0.2"/>
|
||||
<path d="M45.317 2.07103C48.1765 -1.53037 53.9745 0.442937 54.0434 5.041L54.4849 72.2922H9.83113C1.64038 72.2922 -2.92775 62.8321 2.1655 56.4175L45.317 2.07103Z" fill="#3ECF8E"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear" x1="53.9738" y1="54.974" x2="94.1635" y2="71.8295" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#249361"/>
|
||||
<stop offset="1" stop-color="#3ECF8E"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear" x1="36.1558" y1="30.578" x2="54.4844" y2="65.0806" gradientUnits="userSpaceOnUse">
|
||||
<stop/>
|
||||
<stop offset="1" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -113,7 +113,7 @@
|
||||
<!ATTLIST cmd-description key CDATA #REQUIRED>
|
||||
|
||||
<!ELEMENT section (title?,
|
||||
((p|text|list|table|host-add|execute-list|backrest-config|postgres-config|cmd-description|
|
||||
((p|text|list|table|host-add|execute-list|backrest-config|postgres-config|cmd-description|sponsor-list|
|
||||
option-description|code-block|block|section|admonition)*))>
|
||||
<!ATTLIST section id CDATA #REQUIRED>
|
||||
<!ATTLIST section if CDATA "">
|
||||
@@ -140,6 +140,12 @@
|
||||
<!ELEMENT allow (#PCDATA)>
|
||||
<!ELEMENT example (#PCDATA)>
|
||||
|
||||
<!ELEMENT sponsor-list (sponsor+)>
|
||||
|
||||
<!ELEMENT sponsor (#PCDATA)>
|
||||
<!ATTLIST sponsor img CDATA #REQUIRED>
|
||||
<!ATTLIST sponsor url CDATA #REQUIRED>
|
||||
|
||||
<!ELEMENT contributor-list (contributor+)>
|
||||
|
||||
<!ELEMENT contributor (contributor-name-display, contributor-id*)>
|
||||
|
||||
@@ -192,12 +192,25 @@
|
||||
<p>Creating a robust disaster recovery policy with proper replication and backup strategies can be a very complex and daunting task. You may find that you need help during the architecture phase and ongoing support to ensure that your enterprise continues running smoothly. There are a variety of <postgres/> support companies that can provide this service.</p>
|
||||
</section>
|
||||
|
||||
<!-- ======================================================================================================================= -->
|
||||
<section id="sponsorship">
|
||||
<title>Sponsorship</title>
|
||||
|
||||
<p><backrest/> would not exist without sponsors. Writing new features, fixing bugs, reviewing contributions, answering questions from the community, and maintenance all take a considerable amount of time. Please consider a <link url="{[github-url-root]}/sponsors/dwsteele">sponsorship</link> if you use <backrest/> in your enterprise.</p>
|
||||
|
||||
<p>Current sponsors:</p>
|
||||
|
||||
<sponsor-list>
|
||||
<sponsor img="supabase.svg" url="https://supabase.com">Supabase</sponsor>
|
||||
</sponsor-list>
|
||||
|
||||
<p>Past sponsors: <link url="https://crunchydata.com">Crunchy Data</link>, <link url="https://resonate.com">Resonate</link>.</p>
|
||||
</section>
|
||||
|
||||
<!-- ======================================================================================================================= -->
|
||||
<section id="recognition">
|
||||
<title>Recognition</title>
|
||||
|
||||
<p><link url="http://www.crunchydata.com">Crunchy Data</link> and <link url="http://www.resonate.com">Resonate</link> have both generously supported the development of <backrest/>.</p>
|
||||
|
||||
<p><link url="https://thenounproject.com/icon/armchair-129971">Armchair</link> graphic by <link url="https://thenounproject.com/sandorsz">Alexander Skowalsky</link>.</p>
|
||||
</section>
|
||||
</doc>
|
||||
|
||||
Reference in New Issue
Block a user