From 2f38749a7d5b76f37c51e4455e2995fc8063ceee Mon Sep 17 00:00:00 2001 From: Jakob Ferdinand Wegenschimmel Date: Mon, 12 Feb 2024 12:09:20 +0000 Subject: [PATCH] add pdf export --- .devcontainer/devcontainer.json | 2 +- docs/stylesheets/pdf.css | 17 +++++++++++++++++ mkdocs.yml | 5 +++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 docs/stylesheets/pdf.css diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 97bb13b6..ef4d19d0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,5 +3,5 @@ "features": { "ghcr.io/devcontainers-contrib/features/mkdocs:2": {} }, - "postCreateCommand": "pip3 install mkdocs-material mkdocs-awesome-pages-plugin mkdocs-minify-plugin" + "postCreateCommand": "pip3 install mkdocs-material mkdocs-awesome-pages-plugin mkdocs-minify-plugin mkdocs-pdf-export-plugin" } \ No newline at end of file diff --git a/docs/stylesheets/pdf.css b/docs/stylesheets/pdf.css new file mode 100644 index 00000000..c3e8a4f6 --- /dev/null +++ b/docs/stylesheets/pdf.css @@ -0,0 +1,17 @@ +@page { + size: a4 portrait; + /* margin: 25mm 10mm 25mm 10mm; + counter-increment: page; + font-family: "Roboto","Helvetica Neue",Helvetica,Arial,sans-serif; + white-space: pre; + color: grey; + @top-left { + content: '© 2018 My Company'; + } + @top-center { + content: string(chapter); + } + @top-right { + content: 'Page ' counter(page); + } */ +} \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index f0fa3ae0..774132df 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -30,14 +30,19 @@ theme: extra_css: - stylesheets/extra.css + - stylesheets/pdf.css plugins: - search - awesome-pages + - pdf-export markdown_extensions: - admonition + - attr_list - pymdownx.details - pymdownx.superfences + - toc: + permalink: true repo_url: https://github.com/rzlsoftware/test-rzl-hilfe \ No newline at end of file