fix: skip documents with no template attribute
This commit is contained in:
parent
5b7ec31bb7
commit
d0a7adaf5a
1 changed files with 6 additions and 0 deletions
|
@ -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"]),
|
||||
|
|
Loading…
Reference in a new issue