mirror of
https://github.com/zensical/zensical.git
synced 2026-08-26 09:06:49 +00:00
fix: missing custom_dir setting crashes build
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user