From d2e6f90809ee3e80fd83dc5ac1cc8d2b0d916079 Mon Sep 17 00:00:00 2001 From: besendorf Date: Wed, 28 Oct 2026 09:47:28 +0100 Subject: [PATCH 1/2] Generate documentation copyright year at build time --- hooks/copyright.py | 9 +++++++++ mkdocs.yml | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 hooks/copyright.py diff --git a/hooks/copyright.py b/hooks/copyright.py new file mode 100644 index 00000000..19b18e3c --- /dev/null +++ b/hooks/copyright.py @@ -0,0 +1,9 @@ +from datetime import datetime, timezone + + +def on_config(config, **kwargs): + year = datetime.now(timezone.utc).year + config["copyright"] = ( + f"Copyright © 2021-{year} MVT Project Developers" + ) + return config diff --git a/mkdocs.yml b/mkdocs.yml index bf0419db..167496bd 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,7 +1,8 @@ site_name: Mobile Verification Toolkit repo_url: https://github.com/mvt-project/mvt edit_uri: edit/main/docs/ -copyright: Copyright © 2021-2023 MVT Project Developers +hooks: + - hooks/copyright.py site_description: Mobile Verification Toolkit Documentation not_in_nav: | android/adb.md From 735821ee409a6c559e909111fa0a67341f96831a Mon Sep 17 00:00:00 2001 From: Janik Besendorf Date: Wed, 18 Nov 2026 10:10:24 +0100 Subject: [PATCH 2/2] Move the MkDocs copyright hook under docs --- {hooks => docs/hooks}/copyright.py | 4 +--- mkdocs.yml | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) rename {hooks => docs/hooks}/copyright.py (58%) diff --git a/hooks/copyright.py b/docs/hooks/copyright.py similarity index 58% rename from hooks/copyright.py rename to docs/hooks/copyright.py index 19b18e3c..76ebbaf6 100644 --- a/hooks/copyright.py +++ b/docs/hooks/copyright.py @@ -3,7 +3,5 @@ from datetime import datetime, timezone def on_config(config, **kwargs): year = datetime.now(timezone.utc).year - config["copyright"] = ( - f"Copyright © 2021-{year} MVT Project Developers" - ) + config["copyright"] = f"Copyright © 2021-{year} MVT Project Developers" return config diff --git a/mkdocs.yml b/mkdocs.yml index 167496bd..df0474ca 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,7 +2,9 @@ site_name: Mobile Verification Toolkit repo_url: https://github.com/mvt-project/mvt edit_uri: edit/main/docs/ hooks: - - hooks/copyright.py + - docs/hooks/copyright.py +exclude_docs: | + /hooks/ site_description: Mobile Verification Toolkit Documentation not_in_nav: | android/adb.md