Use mkdocs print-site plugin to build all-in-one version of the documentation

This commit is contained in:
Benjamin Renard 2023-06-02 17:01:06 +02:00
parent 7588deba34
commit c8c1c1320a
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC
5 changed files with 22 additions and 0 deletions

View file

@ -94,9 +94,11 @@ build:doc:
script:
- cd doc
- mkdocs build -s
- htmlark public_html/print_page/index.html -o LdapSaisie.html
artifacts:
paths:
- doc/public_html/
- doc/LdapSaisie.html
deploy:doc:
stage: deploy
@ -109,3 +111,4 @@ deploy:doc:
- echo "$SSH_HOST_KEY" | base64 -d > ~/.ssh/known_hosts
script:
- rsync -atv --exclude '.git*' --delete --progress ./doc/public_html/ $SSH_USER@$SSH_HOST:./
- rsync -atv ./doc/LdapSaisie.html $SSH_USER@$SSH_HOST:LdapSaisie.html

1
doc/.gitignore vendored
View file

@ -1 +1,2 @@
public_html
LdapSaisie.html

View file

@ -20,6 +20,7 @@ plugins:
- search:
lang: fr # Set language for search
- include-markdown
- print-site
nav:

12
doc/overrides/main.html Normal file
View file

@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block content %}
{% if page.url_to_print_page %}
<a href="{{ page.url_to_print_page }}" title="Print Site" class="md-content__button md-icon">
{% include ".icons/material/printer.svg" %}
</a>
{% endif %}
{{ super() }}
{% endblock content %}

View file

@ -2,3 +2,8 @@ mkdocs
mkdocs-material
mdx_truly_sane_lists
mkdocs-include-markdown-plugin
mkdocs-print-site-plugin
# For building all-in-one HTML file
html5lib
requests
htmlark