From 2e31b939b9d10de65be95e6eb79d3e5605c1033b Mon Sep 17 00:00:00 2001 From: Martin Donath Date: Sun, 21 Dec 2025 16:02:57 +0100 Subject: [PATCH] fix: missing `custom_dir` setting crashes build Signed-off-by: squidfunk --- python/zensical/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/zensical/config.py b/python/zensical/config.py index 0d52230..07d14b5 100644 --- a/python/zensical/config.py +++ b/python/zensical/config.py @@ -121,7 +121,11 @@ def get_theme_dir() -> str: def get_custom_theme_dir(config: dict) -> str | None: """Return the custom theme directory.""" path = os.path.dirname(os.path.abspath(__file__)) - return os.path.join(path, config["theme"]["custom_dir"]) + if config["theme"].get("custom_dir"): + return os.path.join(path, config["theme"].get("custom_dir")) + + # Otherwise, return no path + return None def _apply_defaults(config: dict, path: str) -> dict: