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

Added SEO and sharing features to the website.

Descriptions wordsmithed (for better or worse) by committer.
This commit is contained in:
Cynthia Shang
2016-05-16 17:01:48 -04:00
committed by David Steele
parent 48eecc2c04
commit 28c5e54b09
16 changed files with 112 additions and 12 deletions

View File

@@ -101,3 +101,5 @@ Please visit [Crunchy Data](http://www.crunchydata.com) for more information.
Primary recognition goes to Stephen Frost for all his valuable advice and criticism during the development of pgBackRest.
[Crunchy Data](http://www.crunchydata.com) has contributed significant time and resources to pgBackRest and continues to actively support development. [Resonate](http://www.resonate.com) also contributed to the development of pgBackRest and allowed early (but well tested) versions to be installed as their primary PostgreSQL backup solution.
[Armchair](https://thenounproject.com/search/?q=lounge+chair&i=129971) graphic by [Sandor Szabo](https://thenounproject.com/sandorsz).

View File

@@ -243,6 +243,10 @@ for my $strOutput (@stryOutput)
"${strBasePath}/xml",
"${strOutputPath}/html",
"${strBasePath}/resource/html/default.css",
defined($oManifest->variableGet('project-favicon')) ?
"${strBasePath}/resource/html/" . $oManifest->variableGet('project-favicon') : undef,
defined($oManifest->variableGet('project-logo')) ?
"${strBasePath}/resource/" . $oManifest->variableGet('project-logo') : undef,
!$bNoExe
);

View File

@@ -519,6 +519,9 @@ sub helpConfigDocGet
my $oDoc = new BackRestDoc::Common::Doc();
$oDoc->paramSet('title', $oConfigDoc->paramGet('title'));
# set the description for use as a meta tag
$oDoc->fieldSet('description', $oConfigDoc->fieldGet('description'));
# Output the introduction
my $oIntroSectionDoc = $oDoc->nodeAdd('section', undef, {id => 'introduction'});
$oIntroSectionDoc->nodeAdd('title')->textSet('Introduction');
@@ -569,6 +572,9 @@ sub helpCommandDocGet
my $oDoc = new BackRestDoc::Common::Doc();
$oDoc->paramSet('title', $oOperationDoc->paramGet('title'));
# set the description for use as a meta tag
$oDoc->fieldSet('description', $oOperationDoc->fieldGet('description'));
# Output the introduction
my $oIntroSectionDoc = $oDoc->nodeAdd('section', undef, {id => 'introduction'});
$oIntroSectionDoc->nodeAdd('title')->textSet('Introduction');

View File

@@ -45,6 +45,9 @@ sub new
my $strOperation,
$self->{strName},
$self->{strTitle},
$self->{strFavicon},
$self->{strLogo},
$self->{strDescription},
$self->{bPretty}
) =
logDebugParam
@@ -52,6 +55,9 @@ sub new
OP_DOC_HTML_BUILDER_NEW, \@_,
{name => 'strName'},
{name => 'strTitle'},
{name => 'strFavicon', required => false},
{name => 'strLogo', required => false},
{name => 'strDescription', required => false},
{name => 'bPretty', default => false}
);
@@ -197,9 +203,30 @@ sub htmlGet
$self->indent(1) . "<link rel=\"stylesheet\" href=\"default.css\" type=\"text/css\"></link>" . $self->lf() .
# $self->indent(1) . "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"></meta>" . $self->lf() .
$self->indent(1) . "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"></meta>" . $self->lf() .
$self->indent(1) . "<meta name=\"og:site_name\" content=\"$self->{strName}\"></meta>" . $self->lf() .
$self->indent(1) . "<meta name=\"og:title\" content=\"$self->{strTitle}\"></meta>" . $self->lf() .
$self->indent(1) . "<meta name=\"og:image\" content=\"favicon.png\"></meta>" . $self->lf() .
$self->indent(1) . "<meta property=\"og:site_name\" content=\"$self->{strName}\"></meta>" . $self->lf() .
$self->indent(1) . "<meta property=\"og:title\" content=\"$self->{strTitle}\"></meta>" . $self->lf() .
$self->indent(1) . "<meta property=\"og:type\" content=\"website\"></meta>" . $self->lf();
if (defined($self->{strFavicon}))
{
$strHtml .=
$self->indent(1) . "<link rel=\"icon\" href=\"$self->{strFavicon}\" type=\"image/png\"></link>" . $self->lf();
}
if (defined($self->{strLogo}))
{
$strHtml .=
$self->indent(1) . "<meta property=\"og:image:type\" content=\"image/png\"></meta>" . $self->lf() .
$self->indent(1) . "<meta property=\"og:image\" content=\"{[backrest-url-base]}/$self->{strLogo}\"></meta>" . $self->lf();
}
if (defined($self->{strDescription}))
{
$strHtml .=
$self->indent(1) . "<meta name=\"description\" content=\"$self->{strDescription}\"></meta>" . $self->lf() .
$self->indent(1) . "<meta property=\"og:description\" content=\"$self->{strDescription}\"></meta>" . $self->lf();
}
$self->indent(0) . "</head>" . $self->lf();
$strHtml .= $self->htmlRender($self->bodyGet(), 0);

View File

@@ -90,13 +90,25 @@ sub process
(defined($oPage->paramGet('title', false)) ? ' ' . $oPage->paramGet('title') : '');
my $strSubTitle = $oPage->paramGet('subtitle', false);
my $oHtmlBuilder = new BackRestDoc::Html::DocHtmlBuilder("{[project]} - Reliable PostgreSQL Backup",
$strTitle . (defined($strSubTitle) ? " - ${strSubTitle}" : ''),
$self->{bPretty});
my $oHtmlBuilder = new BackRestDoc::Html::DocHtmlBuilder(
"{[project]} - Reliable PostgreSQL Backup & Restore",
$strTitle . (defined($strSubTitle) ? " - ${strSubTitle}" : ''),
$self->{oManifest}->variableGet('project-favicon'),
$self->{oManifest}->variableGet('project-logo'),
trim($self->{oDoc}->fieldGet('description')),
$self->{bPretty});
# Generate header
my $oPageHeader = $oHtmlBuilder->bodyGet()->addNew(HTML_DIV, 'page-header');
# add the logo to the header
if (defined($self->{oManifest}->variableGet('html-logo')))
{
$oPageHeader->
addNew(HTML_DIV, 'page-header-logo',
{strContent =>"{[html-logo]}"});
}
$oPageHeader->
addNew(HTML_DIV, 'page-header-title',
{strContent => $strTitle});

View File

@@ -56,6 +56,8 @@ sub new
$self->{strXmlPath},
$self->{strHtmlPath},
$self->{strCssFile},
$self->{strFaviconFile},
$self->{strProjectLogoFile},
$self->{bExe}
) =
logDebugParam
@@ -65,6 +67,8 @@ sub new
{name => 'strXmlPath'},
{name => 'strHtmlPath'},
{name => 'strCssFile'},
{name => 'strFaviconFile', required => false},
{name => 'strProjectLogoFile', required => false},
{name => 'bExe'}
);
@@ -105,6 +109,22 @@ sub process
copy($self->{strCssFile}, $strCssFileDestination)
or confess &log(ERROR, "unable to copy $self->{strCssFile} to ${strCssFileDestination}");
# Copy the favicon file
if (defined($self->{strFaviconFile}))
{
my $strFaviconFileDestination = "$self->{strHtmlPath}/" . $self->{oManifest}->variableGet('project-favicon');
copy($self->{strFaviconFile}, $strFaviconFileDestination)
or confess &log(ERROR, "unable to copy $self->{strFaviconFile} to ${strFaviconFileDestination}");
}
# Copy the project logo file
if (defined($self->{strProjectLogoFile}))
{
my $strProjectLogoFileDestination = "$self->{strHtmlPath}/" . $self->{oManifest}->variableGet('project-logo');
copy($self->{strProjectLogoFile}, $strProjectLogoFileDestination)
or confess &log(ERROR, "unable to copy $self->{strProjectLogoFile} to ${strProjectLogoFileDestination}");
}
foreach my $strPageId ($self->{oManifest}->renderOutList(RENDER_TYPE_HTML))
{
&log(INFO, " render out: ${strPageId}");

View File

@@ -9,6 +9,8 @@
<variable key="project-url-root">/</variable>
<variable key="postgres">PostgreSQL</variable>
<variable key="dash">-</variable>
<variable key="project-logo">logo.png</variable>
<variable key="project-favicon">favicon.png</variable>
<!-- Logo locations -->
<variable key="logo">/backrest/doc/output/latex/logo</variable>
@@ -18,6 +20,7 @@
use POSIX qw(strftime); 'Copyright &amp;copy; 2015' . '-' . strftime('%Y', localtime) .
', The PostgreSQL Global Development Group, &lt;a href="{[github-url-license]}">MIT License&lt;/a>. Updated ' .
strftime('%B ', localtime) . trim(strftime('%e,', localtime)) . strftime(' %Y.', localtime)</variable>
<!-- <variable key="html-logo">&lt;img src=&quot;{[project-logo]}&quot;&gt;</variable> -->
<!-- PDF variables -->
<variable key="pdf-title">{[project]} User Guide</variable>
@@ -39,7 +42,7 @@
<render-source key="user-guide" menu="User Guide"/>
<render-source key="configuration" source="reference" menu="Configuration"/>
<render-source key="command" source="reference" menu="Commands"/>
<render-source key="backlog" source="backlog" menu="Backlog"/>
<render-source key="backlog" menu="Backlog"/>
</render>
<render type="pdf" file="{[pdf-file]}">

View File

@@ -60,6 +60,18 @@ Header
font-weight: bold;
}
.page-header-logo
{
float: left;
margin-top: 0.3em;
}
.page-header-logo > img
{
width: 69px;
height: 69px;
}
/*******************************************************************************
Menu
*******************************************************************************/

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
doc/resource/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE doc SYSTEM "doc.dtd">
<doc subtitle="Feature Backlog">
<description>{[project]} feature requests submitted on Github will be moved to this page unless they can be satisfied immediately.</description>
<section id="introduction">
<title>Introduction</title>
<p>Github has a good facility for reporting issues but it doesn't work as well for feature requests, some of which might take time to implement or never get implemented at all. The result is a long list of issues which makes the <backrest/> project look as if it does not handle problems in a timely fashion, when in fact the vast majority of the issues are not bugs. </p>
<p>Feature requests submitted on Github will be moved here unless they can be satisfied immediately and the feature issue will be closed, but a link will be preserved so comments can be added. This is not ideal but seems like the best compromise at this time.</p>
<p>Feature requests submitted on Github will be moved here (unless they can be satisfied immediately) and the feature issue will be closed, but a link will be preserved so comments can be added. This is not ideal but seems like the best compromise at this time.</p>
<p>Bug reports will stay open on Github until they are addressed and will not appear on this page.</p>
</section>

View File

@@ -1,11 +1,13 @@
<!ELEMENT doc ((intro, changelog)|(config, operation)|(variable-list?, cleanup?, section+))>
<!ELEMENT doc ((intro, changelog)|(config, operation)|(description, variable-list?, cleanup?, section+))>
<!ATTLIST doc title CDATA "">
<!ATTLIST doc subtitle CDATA "">
<!ATTLIST doc toc CDATA "y">
<!ELEMENT description (#PCDATA)>
<!ELEMENT intro (text)>
<!ELEMENT operation (text?, operation-general, command-list)>
<!ELEMENT operation (description, text?, operation-general, command-list)>
<!ATTLIST operation title CDATA #REQUIRED>
<!ELEMENT operation-general (option-list)>
@@ -30,7 +32,7 @@
<!ATTLIST option id CDATA #REQUIRED>
<!ATTLIST option name CDATA #REQUIRED>
<!ELEMENT config (text, config-section-list)>
<!ELEMENT config (description, text, config-section-list)>
<!ATTLIST config title CDATA #REQUIRED>
<!ELEMENT config-example (text)>

View File

@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE doc SYSTEM "doc.dtd">
<doc subtitle="Reliable {[postgres]} Backup &amp; Restore" toc="n">
<description>{[project]} provides fast, reliable backup and restore for {[postgres]} and seamlessly scales to terabyte scale databases by implementing stream compression and multi-threading.</description>
<variable-list>
<!-- Variables used by the rest of the script -->
<variable key="github-url-root">https://github.com</variable>
@@ -157,5 +159,7 @@
<p>Primary recognition goes to Stephen Frost for all his valuable advice and criticism during the development of <backrest/>.
<link url="{[crunchy-url-base]}">Crunchy Data</link> has contributed significant time and resources to <backrest/> and continues to actively support development. <link url="{[resonate-url-base]}">Resonate</link> also contributed to the development of <backrest/> and allowed early (but well tested) versions to be installed as their primary <postgres/> backup solution.</p>
<p><link url="https://thenounproject.com/search/?q=lounge+chair&amp;i=129971">Armchair</link> graphic by <link url="https://thenounproject.com/sandorsz">Sandor Szabo</link>.</p>
</section>
</doc>

View File

@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE doc SYSTEM "doc.dtd">
<doc title="User Guide">
<doc title="Command &amp; Configuration Reference">
<!-- CONFIG -->
<config title="Configuration Reference">
<description>The {[project]} Configuration Reference details all configuration options.</description>
<text><backrest/> can be used entirely with command-line parameters but a configuration file is more practical for installations that are complex or set a lot of options. The default location for the configuration file is <file>/etc/pgbackrest.conf</file>.</text>
<config-section-list title="Settings">
@@ -503,6 +505,8 @@
<!-- COMMAND -->
<operation title="Command Reference">
<description>The {[project]} Command Reference details all commands and options.</description>
<text>Commands are used to execute the various <backrest/> functions. Here the command options are listed exhaustively, that is, each option applicable to a command is listed with that command even if it applies to one or more other commands. This includes all the options that may also configured in <file>pgbackrest.conf</file>.</text>
<operation-general title="General Options">

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE doc SYSTEM "doc.dtd">
<doc subtitle="Regression, Unit, &amp; Integration Testing" toc="y">
<description>{[project]} testing configuration requirements, setup, and options.</description>
<section id="introduction">
<title>Introduction</title>

View File

@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE doc SYSTEM "doc.dtd">
<doc title="User Guide" subtitle="Ubuntu 12.04 &amp; 14.04 / {[postgres]} 9.4">
<description>The {[project]} User Guide demonstrates how to quickly and easily setup {[project]} for your {[postgres]} database. Step-by-step instructions lead the user through all the important features of the fastest, most reliable {[postgres]} backup and restore solution.</description>
<variable-list>
<!-- Variables used by the rest of the script -->
<variable key="perl-lib-path" keyword="default">/usr/lib/perl5</variable>