From 19b99db1979acdee396a3138a95d5729a2a3fba1 Mon Sep 17 00:00:00 2001 From: clarasb Date: Mon, 5 Oct 2026 09:49:53 +0200 Subject: [PATCH 1/2] update docs - links to imprint and privacy policy --- .gitignore | 3 ++ docs/hooks/download_fonts.py | 44 ++++++++++++++++++++++++++ docs/overrides/partials/copyright.html | 11 +++++++ docs/stylesheet/extra.css | 21 ++++++++++++ mkdocs.yml | 15 ++++++++- 5 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 docs/hooks/download_fonts.py create mode 100644 docs/overrides/partials/copyright.html create mode 100644 docs/stylesheet/extra.css diff --git a/.gitignore b/.gitignore index 8250d4d..0d9f2d4 100644 --- a/.gitignore +++ b/.gitignore @@ -161,3 +161,6 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. .idea/ + +# Downloaded assets +docs/assets/downloaded/ diff --git a/docs/hooks/download_fonts.py b/docs/hooks/download_fonts.py new file mode 100644 index 0000000..32a7444 --- /dev/null +++ b/docs/hooks/download_fonts.py @@ -0,0 +1,44 @@ +from pathlib import Path +from urllib.error import URLError +from urllib.request import urlretrieve + +ROBOTO_BASE_URL = "https://raw.githubusercontent.com/google/fonts/main/ofl/roboto" + +DOWNLOADS = ( + { + "name": "Roboto.ttf", + "url": f"{ROBOTO_BASE_URL}/Roboto%5Bwdth,wght%5D.ttf", + }, + { + "name": "Roboto-Italic.ttf", + "url": f"{ROBOTO_BASE_URL}/Roboto-Italic%5Bwdth,wght%5D.ttf", + }, + { + "name": "OFL.txt", + "url": f"{ROBOTO_BASE_URL}/OFL.txt", + }, +) + + +def on_config(config): + """Download self-hosted Roboto assets before MkDocs builds the site.""" + docs_dir = Path(config["docs_dir"]) + font_dir = docs_dir / "assets" / "downloaded" / "fonts" + font_dir.mkdir(parents=True, exist_ok=True) + + for item in DOWNLOADS: + target = font_dir / item["name"] + if target.exists(): + continue + + try: + print(f"Downloading Roboto asset: {item['name']}") + urlretrieve(item["url"], target) + except URLError as exc: + raise RuntimeError( + f"Could not download {item['name']} from {item['url']}. " + "Check your network connection or place the file manually in " + f"{font_dir}." + ) from exc + + return config diff --git a/docs/overrides/partials/copyright.html b/docs/overrides/partials/copyright.html new file mode 100644 index 0000000..64cdec3 --- /dev/null +++ b/docs/overrides/partials/copyright.html @@ -0,0 +1,11 @@ + diff --git a/docs/stylesheet/extra.css b/docs/stylesheet/extra.css new file mode 100644 index 0000000..38b6b4c --- /dev/null +++ b/docs/stylesheet/extra.css @@ -0,0 +1,21 @@ +@font-face { + font-family: "Roboto"; + src: url("../assets/downloaded/fonts/Roboto.ttf") format("truetype"); + font-style: normal; + font-weight: 100 900; + font-stretch: 75% 100%; + font-display: swap; +} + +@font-face { + font-family: "Roboto"; + src: url("../assets/downloaded/fonts/Roboto-Italic.ttf") format("truetype"); + font-style: italic; + font-weight: 100 900; + font-stretch: 75% 100%; + font-display: swap; +} + +:root { + --md-text-font: "Roboto", "Segoe UI", Helvetica, Arial, sans-serif; +} diff --git a/mkdocs.yml b/mkdocs.yml index 1977b63..ff81cce 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,7 +2,7 @@ site_name: zappend repo_url: https://github.com/bcdev/zappend repo_name: bcdev/zappend -copyright: Copyright © 2024, 2025 Brockmann Consult and contributors +copyright: Copyright © 2024-2026 Brockmann Consult and contributors nav: - Overview: index.md @@ -18,6 +18,8 @@ theme: name: material logo: assets/logo.png favicon: assets/logo-small.png + font: false + custom_dir: docs/overrides palette: # Palette toggle for light mode - scheme: default @@ -43,6 +45,11 @@ extra: link: https://github.com/bcdev/zappend - icon: fontawesome/brands/python link: https://pypi.org/project/zappend/ + footer_links: + - text: Imprint + href: https://www.brockmann-consult.de/imprint/ + - text: Privacy Policy + href: https://www.brockmann-consult.de/privacy-policy-documentation-pages/ plugins: - search @@ -56,3 +63,9 @@ plugins: show_source: false heading_level: 3 annotations_path: brief + +extra_css: + - stylesheet/extra.css + +hooks: + - docs/hooks/download_fonts.py \ No newline at end of file From 35fac174afd25c47773f3706a1496e42e58aa2e3 Mon Sep 17 00:00:00 2001 From: clarasb Date: Mon, 5 Oct 2026 11:25:05 +0200 Subject: [PATCH 2/2] Update copyright --- docs/about.md | 2 +- docs/hooks/download_fonts.py | 6 +++++- docs/overrides/partials/copyright.html | 6 ++++++ tests/__init__.py | 6 +++--- tests/config/__init__.py | 4 ++++ tests/config/test_attrs.py | 6 +++--- tests/config/test_config.py | 6 +++--- tests/config/test_normalize.py | 6 +++--- tests/config/test_schema.py | 6 +++--- tests/config/test_validate.py | 6 +++--- tests/contrib/__init__.py | 6 +++--- tests/contrib/test_levels.py | 6 +++--- tests/fsutil/__init__.py | 6 +++--- tests/fsutil/test_fileobj.py | 6 +++--- tests/fsutil/test_path.py | 6 +++--- tests/fsutil/test_transaction.py | 6 +++--- tests/helpers.py | 6 +++--- tests/slice/__init__.py | 4 ++++ tests/slice/test_callable.py | 6 +++--- tests/slice/test_cm.py | 6 +++--- tests/slice/test_source.py | 6 +++--- tests/test_api.py | 6 +++--- tests/test_cli.py | 6 +++--- tests/test_context.py | 6 +++--- tests/test_log.py | 6 +++--- tests/test_metadata.py | 6 +++--- tests/test_processor.py | 6 +++--- tests/test_profiler.py | 6 +++--- tests/test_rollbackstore.py | 6 +++--- tests/test_tailoring.py | 6 +++--- tests/test_xrencoding.py | 6 +++--- zappend/__init__.py | 6 +++--- zappend/api.py | 6 +++--- zappend/cli.py | 6 +++--- zappend/config/__init__.py | 6 +++--- zappend/config/attrs.py | 6 +++--- zappend/config/config.py | 6 +++--- zappend/config/defaults.py | 6 +++--- zappend/config/markdown.py | 6 +++--- zappend/config/normalize.py | 6 +++--- zappend/config/schema.py | 6 +++--- zappend/config/validate.py | 6 +++--- zappend/context.py | 6 +++--- zappend/contrib/__init__.py | 6 +++--- zappend/contrib/levels.py | 6 +++--- zappend/fsutil/__init__.py | 6 +++--- zappend/fsutil/fileobj.py | 6 +++--- zappend/fsutil/path.py | 6 +++--- zappend/fsutil/transaction.py | 6 +++--- zappend/log.py | 6 +++--- zappend/metadata.py | 6 +++--- zappend/processor.py | 6 +++--- zappend/profiler.py | 6 +++--- zappend/rollbackstore.py | 6 +++--- zappend/slice/__init__.py | 6 +++--- zappend/slice/callable.py | 6 +++--- zappend/slice/cm.py | 6 +++--- zappend/slice/source.py | 6 +++--- zappend/slice/sources/__init__.py | 6 +++--- zappend/slice/sources/memory.py | 6 +++--- zappend/slice/sources/persistent.py | 6 +++--- zappend/slice/sources/temporary.py | 6 +++--- zappend/tailoring.py | 6 +++--- 63 files changed, 194 insertions(+), 176 deletions(-) diff --git a/docs/about.md b/docs/about.md index 07508e1..e529070 100644 --- a/docs/about.md +++ b/docs/about.md @@ -79,4 +79,4 @@ zappend --help-config md > docs/config.md `zappend` is open source made available under the terms and conditions of the [MIT License](https://github.com/bcdev/zappend/blob/main/LICENSE). -Copyright © 2024 Brockmann Consult Development +Copyright © 2024-2026 Brockmann Consult Development diff --git a/docs/hooks/download_fonts.py b/docs/hooks/download_fonts.py index 32a7444..3916a9c 100644 --- a/docs/hooks/download_fonts.py +++ b/docs/hooks/download_fonts.py @@ -1,4 +1,8 @@ -from pathlib import Path +# Copyright © 2024-2026 Brockmann Consult and contributors +# Permissions are hereby granted under the terms of the MIT License: +# https://opensource.org/licenses/MIT. + +from pathlib import Path from urllib.error import URLError from urllib.request import urlretrieve diff --git a/docs/overrides/partials/copyright.html b/docs/overrides/partials/copyright.html index 64cdec3..e3e16fb 100644 --- a/docs/overrides/partials/copyright.html +++ b/docs/overrides/partials/copyright.html @@ -1,3 +1,9 @@ + +