From 5343d793bd170be73d071f92ef3015829eba56e1 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 18 Aug 2023 19:23:19 +0200 Subject: [PATCH] Add cover page and print site banner custom templates --- doc/mkdocs.yml | 6 +++- .../assets/templates/custom_cover_page.tpl | 30 +++++++++++++++++++ .../assets/templates/print_site_banner.tpl | 8 +++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 doc/src/assets/templates/custom_cover_page.tpl create mode 100644 doc/src/assets/templates/print_site_banner.tpl diff --git a/doc/mkdocs.yml b/doc/mkdocs.yml index 8643819a..ebd20383 100644 --- a/doc/mkdocs.yml +++ b/doc/mkdocs.yml @@ -1,4 +1,7 @@ site_name: LdapSaisie +site_description: Documentation +site_author: Benjamin Renard +copyright: Easter-eggs docs_dir: 'src' site_dir: 'public_html' repo_url: https://gitlab.easter-eggs.com/ee/ldapsaisie @@ -31,7 +34,8 @@ plugins: enumerate_headings: true enumerate_figures: true add_cover_page: true - cover_page_template: "" + cover_page_template: "src/assets/templates/custom_cover_page.tpl" + print_site_banner_template: "src/assets/templates/print_site_banner.tpl" path_to_pdf: "" enabled: !ENV [ENABLED_PRINT_SITE, True] exclude: diff --git a/doc/src/assets/templates/custom_cover_page.tpl b/doc/src/assets/templates/custom_cover_page.tpl new file mode 100644 index 00000000..540fc364 --- /dev/null +++ b/doc/src/assets/templates/custom_cover_page.tpl @@ -0,0 +1,30 @@ + +
+ + {% if config.site_name %} +

{{ config.site_name }}

+ {% endif %} + + {% if config.site_description %} +

{{ config.site_description }}

+ {% endif %} + +
+ +

+ + Auteur: Benjamin Renard + (brenard@easter-eggs.com / + brenard@zionetrix.net) +
+ + {% if config.site_url %} + Site web: {{ config.site_url }}
+ {% endif %} + {% if config.repo_url %} + Repo: {{ config.repo_url }}
+ {% endif %} + {% if config.copyright %} + {{ config.copyright }}
+ {% endif %} +

diff --git a/doc/src/assets/templates/print_site_banner.tpl b/doc/src/assets/templates/print_site_banner.tpl new file mode 100644 index 00000000..936bdb16 --- /dev/null +++ b/doc/src/assets/templates/print_site_banner.tpl @@ -0,0 +1,8 @@ +

+ Cette page contient l'ensemble de la documentation du projet LdapSaisie et est adaptée pour une + impression papier ou PDF. +

+ +

+ Note : Cette boîte n'apparaîtra pas à l'impression. +