From a5d8261bf4bab01ba3a468afd432471b591f286c Mon Sep 17 00:00:00 2001 From: Alina Derkach Date: Thu, 12 Jun 2025 18:21:26 +0200 Subject: [PATCH] Configure PDF generation plugin 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 --- .../_resource/overrides/partials/banner.html | 2 +- .../_resourcepdf/overrides/404.html | 9 ++ .../_resourcepdf/overrides/main.html | 67 +++++++++ .../overrides/partials/banner.html | 9 ++ .../overrides/partials/copyright.html | 14 ++ .../overrides/partials/header.html | 135 ++++++++++++++++++ .../docs/templates/pdf_cover_page.tpl | 11 ++ contrib/pg_tde/documentation/mkdocs-pdf.yml | 15 -- contrib/pg_tde/documentation/mkdocs.yml | 30 ++-- contrib/pg_tde/documentation/requirements.txt | 2 + 10 files changed, 267 insertions(+), 27 deletions(-) create mode 100644 contrib/pg_tde/documentation/_resourcepdf/overrides/404.html create mode 100644 contrib/pg_tde/documentation/_resourcepdf/overrides/main.html create mode 100644 contrib/pg_tde/documentation/_resourcepdf/overrides/partials/banner.html create mode 100644 contrib/pg_tde/documentation/_resourcepdf/overrides/partials/copyright.html create mode 100644 contrib/pg_tde/documentation/_resourcepdf/overrides/partials/header.html create mode 100644 contrib/pg_tde/documentation/docs/templates/pdf_cover_page.tpl delete mode 100644 contrib/pg_tde/documentation/mkdocs-pdf.yml diff --git a/contrib/pg_tde/documentation/_resource/overrides/partials/banner.html b/contrib/pg_tde/documentation/_resource/overrides/partials/banner.html index 1553c0301cc1f..69b904fe286bf 100644 --- a/contrib/pg_tde/documentation/_resource/overrides/partials/banner.html +++ b/contrib/pg_tde/documentation/_resource/overrides/partials/banner.html @@ -4,6 +4,6 @@
- Get help from Percona + Get help from Percona
diff --git a/contrib/pg_tde/documentation/_resourcepdf/overrides/404.html b/contrib/pg_tde/documentation/_resourcepdf/overrides/404.html new file mode 100644 index 0000000000000..36c0dcfc5f0bb --- /dev/null +++ b/contrib/pg_tde/documentation/_resourcepdf/overrides/404.html @@ -0,0 +1,9 @@ +{#- + This file was automatically generated - do not edit + -#} + {% extends "main.html" %} + {% block content %} +

404 - Not found

+

+ We can't find the page you are looking for. Try using the Search or return to homepage .

+ {% endblock %} \ No newline at end of file diff --git a/contrib/pg_tde/documentation/_resourcepdf/overrides/main.html b/contrib/pg_tde/documentation/_resourcepdf/overrides/main.html new file mode 100644 index 0000000000000..1fca8c3d06631 --- /dev/null +++ b/contrib/pg_tde/documentation/_resourcepdf/overrides/main.html @@ -0,0 +1,67 @@ +{#- + This file was automatically generated - do not edit +-#} +{% extends "base.html" %} + +{% block announce %} + This is the Release Candidate 2 (RC2) of Percona Transparent Data Encryption (TDE) extension. +

It is not recommended for production environments at this stage.

+

We encourage you to test it and give your feedback. + This will help us improve the product and make it production-ready faster.

+{% endblock %} + +{% block scripts %} + +{{ super() }} +{% endblock %} + + {% block extrahead %} + {{ super() }} + {% set title = config.site_name %} + {% if page and page.meta and page.meta.title %} + {% set title = title ~ " - " ~ page.meta.title %} + {% elif page and page.title and not page.is_homepage %} + {% set title = title ~ " - " ~ page.title %} + {% endif %} + + + + + {% endblock %} + +{% block site_nav %} + {% if nav %} + {% if page.meta and page.meta.hide %} + {% set hidden = "hidden" if "navigation" in page.meta.hide %} + {% endif %} + + {% endif %} + {% if "toc.integrate" not in features %} + {% if page.meta and page.meta.hide %} + {% set hidden = "hidden" if "toc" in page.meta.hide %} + {% endif %} + + {% endif %} + + {% endblock %} diff --git a/contrib/pg_tde/documentation/_resourcepdf/overrides/partials/banner.html b/contrib/pg_tde/documentation/_resourcepdf/overrides/partials/banner.html new file mode 100644 index 0000000000000..e75867643dc29 --- /dev/null +++ b/contrib/pg_tde/documentation/_resourcepdf/overrides/partials/banner.html @@ -0,0 +1,9 @@ +
+

+

For help, click the link below to get free database assistance or contact our experts for personalized support.

+ + +
\ No newline at end of file diff --git a/contrib/pg_tde/documentation/_resourcepdf/overrides/partials/copyright.html b/contrib/pg_tde/documentation/_resourcepdf/overrides/partials/copyright.html new file mode 100644 index 0000000000000..d31be105f453b --- /dev/null +++ b/contrib/pg_tde/documentation/_resourcepdf/overrides/partials/copyright.html @@ -0,0 +1,14 @@ +{#- + This file was automatically generated - do not edit + -#} + \ No newline at end of file diff --git a/contrib/pg_tde/documentation/_resourcepdf/overrides/partials/header.html b/contrib/pg_tde/documentation/_resourcepdf/overrides/partials/header.html new file mode 100644 index 0000000000000..1983ab1baef50 --- /dev/null +++ b/contrib/pg_tde/documentation/_resourcepdf/overrides/partials/header.html @@ -0,0 +1,135 @@ + + + +{% set class = "md-header" %} +{% if "navigation.tabs.sticky" in features %} + {% set class = class ~ " md-header--shadow md-header--lifted" %} +{% elif "navigation.tabs" not in features %} + {% set class = class ~ " md-header--shadow" %} +{% endif %} + + +
+ + + + + + + + {% if "navigation.tabs.sticky" in features %} + {% if "navigation.tabs" in features %} + {% include "partials/tabs.html" %} + {% endif %} + {% endif %} +
diff --git a/contrib/pg_tde/documentation/docs/templates/pdf_cover_page.tpl b/contrib/pg_tde/documentation/docs/templates/pdf_cover_page.tpl new file mode 100644 index 0000000000000..286838e89fc54 --- /dev/null +++ b/contrib/pg_tde/documentation/docs/templates/pdf_cover_page.tpl @@ -0,0 +1,11 @@ + +{{ config.extra.added_key }} +

+ +

+

Percona Transparent Data Encryption

+{% if config.site_description %} +

{{ config.site_description }}

+{% endif %} +

Release Candidate (2025-03-27)

+ \ No newline at end of file diff --git a/contrib/pg_tde/documentation/mkdocs-pdf.yml b/contrib/pg_tde/documentation/mkdocs-pdf.yml deleted file mode 100644 index 990732fb25072..0000000000000 --- a/contrib/pg_tde/documentation/mkdocs-pdf.yml +++ /dev/null @@ -1,15 +0,0 @@ -# MkDocs configuration for PDF builds -# Usage: ENABLE_PDF_EXPORT=1 mkdocs build -f mkdocs-pdf.yml - -INHERIT: mkdocs.yml - -copyright: Percona LLC, © 2025 - -extra_css: - - https://unicons.iconscout.com/release/v3.0.3/css/line.css - - https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css - - css/extra.css - -markdown_extensions: - pymdownx.tabbed: {} - admonition: {} diff --git a/contrib/pg_tde/documentation/mkdocs.yml b/contrib/pg_tde/documentation/mkdocs.yml index ab8c6e25236ff..9d542f2156a1c 100644 --- a/contrib/pg_tde/documentation/mkdocs.yml +++ b/contrib/pg_tde/documentation/mkdocs.yml @@ -17,7 +17,7 @@ theme: name: material logo: _images/postgresql-mark.svg favicon: _images/postgresql-fav.svg - custom_dir: _resource/overrides + custom_dir: _resourcepdf/overrides font: text: Roboto palette: @@ -116,16 +116,24 @@ plugins: - macros: include_yaml: - 'variables.yml' # Use in markdown as '{{ VAR }}' - - with-pdf: # https://github.com/orzih/mkdocs-with-pdf - output_path: '_pdf/PerconaTDE.pdf' - cover_title: 'Percona Transparent Data Encryption' - cover_subtitle: Release Candidate (2025-03-27) - author: 'Percona Technical Documentation Team' - cover_logo: docs/_images/Percona_Logo_Color.png - debug_html: false - two_columns_level: 3 - custom_template_path: _resource/templates - enabled_if_env: ENABLE_PDF_EXPORT + - print-site: + add_to_navigation: false + print_page_title: 'Percona Transparent Data Encryption documentation' + add_print_site_banner: false + # Table of contents + add_table_of_contents: true + toc_title: 'Table of Contents' + toc_depth: 2 + # Content-related + add_full_urls: false + enumerate_headings: false + enumerate_headings_depth: 1 + enumerate_figures: true + add_cover_page: true + cover_page_template: "docs/templates/pdf_cover_page.tpl" + path_to_pdf: "" + include_css: true + enabled: true extra: version: diff --git a/contrib/pg_tde/documentation/requirements.txt b/contrib/pg_tde/documentation/requirements.txt index 87a44fb4e5313..dfaa1ad8e0d55 100644 --- a/contrib/pg_tde/documentation/requirements.txt +++ b/contrib/pg_tde/documentation/requirements.txt @@ -16,3 +16,5 @@ mike mkdocs-glightbox Pillow > 10.1.0 # Pillow is required for mkdocs-glightbox mkdocs-open-in-new-tab # added to fix the open in new tab issue with mkdocs-material +mkdocs-open-in-new-tab +mkdocs-print-site-plugin \ No newline at end of file