From cda18b2e6f64b619c7308d246793849acd8ae388 Mon Sep 17 00:00:00 2001 From: Tim Grelka Date: Fri, 29 Aug 2025 00:33:41 +0200 Subject: [PATCH] fix: skip rendering empty slides --- src/build.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/build.py b/src/build.py index f8497ce..d309d65 100644 --- a/src/build.py +++ b/src/build.py @@ -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 += "\n" for section in sections: + if section["slide"] is None: + continue + if not section["slide"].startswith("---"): section["slide"] = "---\n" + section["slide"] tmp = f'
\n

{section["title"]}

\n
\n'