fix: isolate GTIN tool and legal pages

This commit is contained in:
desfoto automation
2026-09-25 19:47:28 +02:00
parent 160d72f144
commit 89b8ca2283
15 changed files with 284 additions and 38 deletions

View File

@@ -40,7 +40,11 @@ from theme import CSS, TOKENS # noqa: E402
WIDTHS = (480, 768, 1200, 1600)
WEBP_QUALITY = 84
UNLISTED_HTML = ["gtin/index.html"]
UNLISTED_HTML = [
"gtin/index.html",
"gtin/impressum/index.html",
"gtin/datenschutz/index.html",
]
INK = (23, 20, 15)
PAPER = (246, 242, 234)
@@ -281,7 +285,7 @@ def build_html(table: dict[str, dict]) -> list[tuple[str, str]]:
print(f" [html] {rel}")
shutil.rmtree(SITE / "gtin", ignore_errors=True)
shutil.copytree(SRC / "gtin", SITE / "gtin")
print(" [html] gtin/index.html (unlisted browser tool)")
print(" [html] gtin/ (unlisted browser tool and standalone legal pages)")
not_found = pages.not_found().replace("og-desfoto.jpg", "og-desfoto.jpg")
(SITE / "404.html").write_text(not_found, encoding="utf-8")
print(" [html] 404.html")
@@ -531,6 +535,7 @@ def link_check(routes: list[tuple[str, str]]) -> list[str]:
problems: list[str] = []
built = {f"/{rel}".replace("/index.html", "/") for _p, rel in routes}
built.update(f"/{rel}".replace("/index.html", "/") for rel in UNLISTED_HTML)
built.add("/404.html")
for rel in ["sitemap.xml", "robots.txt", "site.webmanifest", "favicon.svg", ".well-known/security.txt",
"assets/site.css", "assets/site.js", "assets/fonts.css"]: