Skip to content

Commit 683af9f

Browse files
Configure PDF generation plugin (#427)
The modified files allow the creation of the pdf for pg_tde modified: contrib/pg_tde/documentation/_resource/overrides/partials/banner.html new file: contrib/pg_tde/documentation/_resourcepdf/overrides/404.html new file: contrib/pg_tde/documentation/_resourcepdf/overrides/main.html new file: contrib/pg_tde/documentation/_resourcepdf/overrides/partials/banner.html new file: contrib/pg_tde/documentation/_resourcepdf/overrides/partials/copyright.html new file: contrib/pg_tde/documentation/_resourcepdf/overrides/partials/header.html new file: contrib/pg_tde/documentation/docs/templates/pdf_cover_page.tpl deleted: contrib/pg_tde/documentation/mkdocs-pdf.yml modified: contrib/pg_tde/documentation/mkdocs.yml modified: contrib/pg_tde/documentation/requirements.txt Co-authored-by: Dragos Andriciuc <dragos.andriciuc@percona.com>
1 parent 3904c99 commit 683af9f

File tree

10 files changed

+267
-27
lines changed

10 files changed

+267
-27
lines changed

contrib/pg_tde/documentation/_resource/overrides/partials/banner.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
<div class="actions">
66

7-
<a href="https://docs.percona.com/pg-stat-monitor/get-help.html" style="color: var(--md-typeset-a-color);">Get help from Percona</a>
7+
<a href="https://docs.percona.com/pg-tde/get-help.html" style="color: var(--md-typeset-a-color);">Get help from Percona</a>
88
</div>
99
</div>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{#-
2+
This file was automatically generated - do not edit
3+
-#}
4+
{% extends "main.html" %}
5+
{% block content %}
6+
<h1>404 - Not found</h1>
7+
<p>
8+
We can't find the page you are looking for. Try using the Search or <a href= "{{ config.extra.homepage | d(nav.homepage.url, true) | url }}"> return to homepage </a>. </p>
9+
{% endblock %}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{#-
2+
This file was automatically generated - do not edit
3+
-#}
4+
{% extends "base.html" %}
5+
6+
{% block announce %}
7+
This is the <strong>Release Candidate 2 (RC2)</strong> of Percona Transparent Data Encryption (TDE) extension.
8+
<p><strong>It is not recommended for production environments at this stage.</strong></p>
9+
<p>We encourage you to test it and <a href= "https://forums.percona.com/c/postgresql/pg-tde-transparent-data-encryption-tde/82">give your feedback</a>.
10+
This will help us improve the product and make it production-ready faster.</p>
11+
{% endblock %}
12+
13+
{% block scripts %}
14+
<script src="https://cmp.osano.com/Azqe5vTyLOSbN3OuT/49ad85b5-0418-4794-ab81-7599dddd534c/osano.js"></script>
15+
{{ super() }}
16+
{% endblock %}
17+
18+
{% block extrahead %}
19+
{{ super() }}
20+
{% set title = config.site_name %}
21+
{% if page and page.meta and page.meta.title %}
22+
{% set title = title ~ " - " ~ page.meta.title %}
23+
{% elif page and page.title and not page.is_homepage %}
24+
{% set title = title ~ " - " ~ page.title %}
25+
{% endif %}
26+
<meta property="og:type" content="website" />
27+
<meta property="og:title" content="{{ title }}" />
28+
<meta property="og:image" content="https://docs.percona.com/pg-tde/_images/pg_tde.png">
29+
<meta property="og:url" content="https://docs.percona.com/pg-tde/">
30+
{% endblock %}
31+
32+
{% block site_nav %}
33+
{% if nav %}
34+
{% if page.meta and page.meta.hide %}
35+
{% set hidden = "hidden" if "navigation" in page.meta.hide %}
36+
{% endif %}
37+
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" {{ hidden }}>
38+
<div class="md-sidebar__scrollwrap">
39+
<div class="md-sidebar__inner">
40+
{% include "partials/nav.html" %}
41+
<br>
42+
<label class="md-nav__title" for="__drawer">
43+
</label>
44+
</div>
45+
</div>
46+
</div>
47+
{% endif %}
48+
{% if "toc.integrate" not in features %}
49+
{% if page.meta and page.meta.hide %}
50+
{% set hidden = "hidden" if "toc" in page.meta.hide %}
51+
{% endif %}
52+
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" {{ hidden }}>
53+
<div class="md-sidebar__scrollwrap">
54+
<div class="md-sidebar__inner">
55+
{% include "partials/toc.html" %}
56+
</div>
57+
<div class="md-sidebar__inner">
58+
{% include "partials/banner.html" %}
59+
</div>
60+
</div>
61+
</div>
62+
{% endif %}
63+
<script>
64+
!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys onSessionId".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
65+
posthog.init('phc_7unoI9J6Fm0SMrfDp35xNOpCRTkOAibbffQwdGWbHnL',{api_host:'https://eu.posthog.com'})
66+
</script>
67+
{% endblock %}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div data-banner="data-banner">
2+
<p><svg style="display:block;margin:-1em 0 0.75em" width="78" height="69" viewBox="0 0 78 69" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M56.7281 30.7666C62.6528 26.8938 64.5914 18.9942 61.0059 12.7854C59.2094 9.67113 56.3053 7.44082 52.8311 6.50951C49.6122 5.64535 46.2502 5.99872 43.2912 7.49366L39.251 0.5L30.8648 15.0245L11.4811 48.5937H67.021L56.7281 30.7666ZM51.881 10.0674C54.4064 10.7401 56.5079 12.3616 57.8168 14.6194C60.3895 19.0701 59.053 24.7153 54.8808 27.5665L45.1362 10.6905C47.2355 9.68104 49.6034 9.46087 51.881 10.0674ZM39.251 7.87125L60.6339 44.907H48.1228L32.9927 18.7102L39.2499 7.87235L39.251 7.87125ZM17.8682 44.907L30.8637 22.4035L43.8592 44.907H17.8682Z" fill="url(#paint0_linear_2899_1968)"></path><path style="fill:var(--md-typeset-color)" d="M4.981 64.943H3.157V68.207H.756V57.323H5.217C7.822 57.323 9.397 58.861 9.397 61.086V61.116C9.397 63.635 7.433 64.94 4.984 64.94L4.981 64.943V64.943ZM6.961 61.134C6.961 60.061 6.213 59.485 5.011 59.485H3.154V62.812H5.056C6.258 62.812 6.958 62.096 6.958 61.163V61.134H6.961ZM10.738 68.208V57.323H18.973V59.455H13.124V61.664H18.27V63.796H13.124V66.082H19.051V68.214H10.738V68.208 68.208ZM27.557 68.208 25.218 64.726H23.332V68.208H20.931V57.323H25.921C28.496 57.323 30.039 58.677 30.039 60.915V60.945C30.039 62.702 29.088 63.807 27.7 64.32L30.367 68.207H27.556L27.557 68.208ZM27.605 61.041C27.605 60.016 26.887 59.485 25.719 59.485H23.333V62.61H25.767C26.936 62.61 27.605 61.987 27.605 61.071V61.042 61.041ZM36.922 68.499C33.668 68.499 31.249 65.994 31.249 62.825V62.795C31.249 59.659 33.619 57.091 37.019 57.091 39.105 57.091 40.356 57.783 41.383 58.792L39.834 60.571C38.98 59.798 38.113 59.327 37.004 59.327 35.141 59.327 33.795 60.871 33.795 62.762V62.793C33.795 64.684 35.107 66.257 37.004 66.257 38.268 66.257 39.043 65.753 39.913 64.964L41.462 66.524C40.322 67.738 39.059 68.493 36.925 68.493L36.922 68.499ZM47.885 68.499C44.47 68.499 42.021 65.962 42.021 62.825V62.795C42.021 59.659 44.503 57.091 47.915 57.091 51.327 57.091 53.779 59.628 53.779 62.765V62.795C53.779 65.931 51.297 68.499 47.885 68.499ZM51.237 62.795C51.237 60.904 49.846 59.331 47.885 59.331 45.925 59.331 44.567 60.874 44.567 62.766V62.796C44.567 64.688 45.959 66.261 47.919 66.261 49.879 66.261 51.237 64.717 51.237 62.826V62.795 62.795ZM67.001 68.217 72.374 57.091 77.746 68.218H75.052L72.374 62.681 69.705 68.218H67.001V68.217ZM66.007 57.327V68.5L57.813 61.884V68.199H55.264V57.091L63.458 63.681V57.327H66.007Z"></path><defs><linearGradient id="paint0_linear_2899_1968" x1="18.1513" y1="44.7152" x2="61.4356" y2="20.9786" gradientUnits="userSpaceOnUse"><stop stop-color="#FC3519"></stop><stop offset="1" stop-color="#F0D136"></stop></linearGradient></defs></svg></p>
3+
<p>For help, click the link below to get free database assistance or contact our experts for personalized support.</p>
4+
5+
<div class="actions">
6+
7+
<a href="https://docs.percona.com/pg-tde/get-help.html" style="color: var(--md-typeset-a-color);">Get help from Percona</a>
8+
</div>
9+
</div>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{#-
2+
This file was automatically generated - do not edit
3+
-#}
4+
<div class="md-copyright">
5+
<div class="md-copyright__highlight">
6+
<a href='https://percona.com' target='_blank'>Percona LLC and/or its affiliates, </a> &copy; {{ build_date_utc.strftime('%Y') }} — <a href="#" onclick="Osano.cm.showDrawer('osano-cm-dom-info-dialog-open')">Cookie Preferences</a>
7+
</div>
8+
{% if not config.extra.generator == false %}
9+
Made with
10+
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
11+
Material for MkDocs
12+
</a>
13+
{% endif %}
14+
</div>
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
<!--
2+
Copyright (c) 2016-2024 Martin Donath <martin.donath@squidfunk.com>
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to
6+
deal in the Software without restriction, including without limitation the
7+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8+
sell copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in
12+
all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20+
IN THE SOFTWARE.
21+
-->
22+
23+
<!-- Determine classes -->
24+
{% set class = "md-header" %}
25+
{% if "navigation.tabs.sticky" in features %}
26+
{% set class = class ~ " md-header--shadow md-header--lifted" %}
27+
{% elif "navigation.tabs" not in features %}
28+
{% set class = class ~ " md-header--shadow" %}
29+
{% endif %}
30+
31+
<!-- Header -->
32+
<header class="{{ class }}" data-md-component="header">
33+
34+
<!-- Super Nav -->
35+
<div class="superNav">
36+
<div class="md-header__inner md-grid">
37+
<a href="https://docs.percona.com/percona-for-postgresql/" title="Percona Documentation home page">
38+
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
39+
<mask id="a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24">
40+
<path d="M0 0h24v24H0z"/>
41+
</mask>
42+
<g mask="url(#a)">
43+
<path d="m7.825 13 5.6 5.6L12 20l-8-8 8-8 1.425 1.4-5.6 5.6H20v2H7.825Z"/>
44+
</g>
45+
</svg>
46+
<span>Percona Software for PostgreSQL Documentation</span>
47+
</a>
48+
</div>
49+
</div>
50+
51+
<nav
52+
class="md-header__inner md-grid"
53+
aria-label="{{ lang.t('header') }}"
54+
>
55+
56+
<!-- Link to home -->
57+
<a
58+
href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}"
59+
title="{{ config.site_name | e }}"
60+
class="md-header__button md-logo"
61+
aria-label="{{ config.site_name }}"
62+
data-md-component="logo"
63+
>
64+
{% include "partials/logo.html" %}
65+
</a>
66+
67+
<!-- Button to open drawer -->
68+
<label class="md-header__button md-icon" for="__drawer">
69+
{% set icon = config.theme.icon.menu or "material/menu" %}
70+
{% include ".icons/" ~ icon ~ ".svg" %}
71+
</label>
72+
73+
<!-- Header title -->
74+
<div class="md-header__title">
75+
<div class="md-header__ellipsis">
76+
<a href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}" class="md-header__topic">
77+
<span class="md-ellipsis">
78+
{{ config.site_name }}
79+
</span>
80+
</a>
81+
<div class="md-header__topic" data-md-component="header-topic">
82+
<span class="md-ellipsis">
83+
{% if page.meta and page.meta.title %}
84+
{{ page.meta.title }}
85+
{% else %}
86+
{{ page.title }}
87+
{% endif %}
88+
</span>
89+
</div>
90+
</div>
91+
</div>
92+
93+
<!-- Color palette toggle -->
94+
{% if config.theme.palette %}
95+
{% if not config.theme.palette is mapping %}
96+
{% include "partials/palette.html" %}
97+
{% endif %}
98+
{% endif %}
99+
100+
<!-- User preference: color palette -->
101+
{% if not config.theme.palette is mapping %}
102+
{% include "partials/javascripts/palette.html" %}
103+
{% endif %}
104+
105+
<!-- Site language selector -->
106+
{% if config.extra.alternate %}
107+
{% include "partials/alternate.html" %}
108+
{% endif %}
109+
110+
<!-- Button to open search modal -->
111+
{% if "material/search" in config.plugins %}
112+
<label class="md-header__button md-icon" for="__search">
113+
{% set icon = config.theme.icon.search or "material/magnify" %}
114+
{% include ".icons/" ~ icon ~ ".svg" %}
115+
</label>
116+
117+
<!-- Search interface -->
118+
{% include "partials/search.html" %}
119+
{% endif %}
120+
121+
<!-- Repository information -->
122+
{% if config.repo_url %}
123+
<div class="md-header__source">
124+
{% include "partials/source.html" %}
125+
</div>
126+
{% endif %}
127+
</nav>
128+
129+
<!-- Navigation tabs (sticky) -->
130+
{% if "navigation.tabs.sticky" in features %}
131+
{% if "navigation.tabs" in features %}
132+
{% include "partials/tabs.html" %}
133+
{% endif %}
134+
{% endif %}
135+
</header>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!--<h1>'{{ config.site_name }}'</h1>-->
2+
{{ config.extra.added_key }}
3+
<p>
4+
<img src="_images/Percona_Logo_Color.png" />
5+
</p>
6+
<h1>Percona Transparent Data Encryption</h1>
7+
{% if config.site_description %}
8+
<h1>{{ config.site_description }}</h1>
9+
{% endif %}
10+
<h2>Release Candidate (2025-03-27)</h2>
11+
<!--<h3>Percona Technical Documentation Team</h3>-->

contrib/pg_tde/documentation/mkdocs-pdf.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

contrib/pg_tde/documentation/mkdocs.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ theme:
1717
name: material
1818
logo: _images/postgresql-mark.svg
1919
favicon: _images/postgresql-fav.svg
20-
custom_dir: _resource/overrides
20+
custom_dir: _resourcepdf/overrides
2121
font:
2222
text: Roboto
2323
palette:
@@ -116,16 +116,24 @@ plugins:
116116
- macros:
117117
include_yaml:
118118
- 'variables.yml' # Use in markdown as '{{ VAR }}'
119-
- with-pdf: # https://github.com/orzih/mkdocs-with-pdf
120-
output_path: '_pdf/PerconaTDE.pdf'
121-
cover_title: 'Percona Transparent Data Encryption'
122-
cover_subtitle: Release Candidate (2025-03-27)
123-
author: 'Percona Technical Documentation Team'
124-
cover_logo: docs/_images/Percona_Logo_Color.png
125-
debug_html: false
126-
two_columns_level: 3
127-
custom_template_path: _resource/templates
128-
enabled_if_env: ENABLE_PDF_EXPORT
119+
- print-site:
120+
add_to_navigation: false
121+
print_page_title: 'Percona Transparent Data Encryption documentation'
122+
add_print_site_banner: false
123+
# Table of contents
124+
add_table_of_contents: true
125+
toc_title: 'Table of Contents'
126+
toc_depth: 2
127+
# Content-related
128+
add_full_urls: false
129+
enumerate_headings: false
130+
enumerate_headings_depth: 1
131+
enumerate_figures: true
132+
add_cover_page: true
133+
cover_page_template: "docs/templates/pdf_cover_page.tpl"
134+
path_to_pdf: ""
135+
include_css: true
136+
enabled: true
129137

130138
extra:
131139
version:

contrib/pg_tde/documentation/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ mike
1616
mkdocs-glightbox
1717
Pillow > 10.1.0 # Pillow is required for mkdocs-glightbox
1818
mkdocs-open-in-new-tab # added to fix the open in new tab issue with mkdocs-material
19+
mkdocs-open-in-new-tab
20+
mkdocs-print-site-plugin

0 commit comments

Comments
 (0)