fix: skip documents with no template attribute
All checks were successful
/ static-analysis (push) Successful in 2m4s
/ export-trace (push) Successful in 31s

This commit is contained in:
Marc 2024-11-19 00:09:51 -05:00
parent 5b7ec31bb7
commit d0a7adaf5a
Signed by: marc
GPG key ID: 048E042F22B5DC79

View file

@ -48,6 +48,12 @@ def build_site(
current_document.source_locator.stem + ".html"
)
if "template" not in current_metadata:
logger.warning(
f"Skipped {current_document.source_locator.name}, no template attribute."
)
continue
with open(target_path, "w") as out:
rendered = renderer.render(
str(current_metadata["template"]),