fix: skip rendering empty slides
This commit is contained in:
+3
-1
@@ -55,7 +55,6 @@ class Build:
|
|||||||
|
|
||||||
with (self.config.p_data / "metadata.json").open() as file:
|
with (self.config.p_data / "metadata.json").open() as file:
|
||||||
metadata = json.load(file)
|
metadata = json.load(file)
|
||||||
number = metadata[f"{input}"]["number"] # Fragennummer z.B. AB123
|
|
||||||
|
|
||||||
if f"{input}" in metadata:
|
if f"{input}" in metadata:
|
||||||
metadata = metadata[f"{input}"]
|
metadata = metadata[f"{input}"]
|
||||||
@@ -200,6 +199,9 @@ class Build:
|
|||||||
result += help_template.render()
|
result += help_template.render()
|
||||||
result += "</section>\n"
|
result += "</section>\n"
|
||||||
for section in sections:
|
for section in sections:
|
||||||
|
if section["slide"] is None:
|
||||||
|
continue
|
||||||
|
|
||||||
if not section["slide"].startswith("---"):
|
if not section["slide"].startswith("---"):
|
||||||
section["slide"] = "---\n" + section["slide"]
|
section["slide"] = "---\n" + section["slide"]
|
||||||
tmp = f'<section data-background="#DAEEFA">\n<h1>{section["title"]}</h1>\n</section>\n'
|
tmp = f'<section data-background="#DAEEFA">\n<h1>{section["title"]}</h1>\n</section>\n'
|
||||||
|
|||||||
Reference in New Issue
Block a user