fix: skip rendering empty slides

This commit is contained in:
Tim Grelka
2025-08-29 00:33:41 +02:00
parent cd44d61d1e
commit cda18b2e6f
+3 -1
View File
@@ -55,7 +55,6 @@ class Build:
with (self.config.p_data / "metadata.json").open() as file:
metadata = json.load(file)
number = metadata[f"{input}"]["number"] # Fragennummer z.B. AB123
if f"{input}" in metadata:
metadata = metadata[f"{input}"]
@@ -200,6 +199,9 @@ class Build:
result += help_template.render()
result += "</section>\n"
for section in sections:
if section["slide"] is None:
continue
if not section["slide"].startswith("---"):
section["slide"] = "---\n" + section["slide"]
tmp = f'<section data-background="#DAEEFA">\n<h1>{section["title"]}</h1>\n</section>\n'