From e3772d63a3143d9bbbb3af56f11f77e3de82a202 Mon Sep 17 00:00:00 2001 From: jgrogan Date: Mon, 18 Nov 2024 20:39:33 +0000 Subject: [PATCH] Small further cleaning --- src/dialann/site_generator.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/dialann/site_generator.py b/src/dialann/site_generator.py index 6290c42..b90c02c 100644 --- a/src/dialann/site_generator.py +++ b/src/dialann/site_generator.py @@ -27,8 +27,7 @@ def _replace_content(src: Path, dst: Path): def _write_file(path: Path, content: str): - os.makedirs(output_path.parent, exist_ok=True) - + os.makedirs(path.parent, exist_ok=True) with open(path, "w", encoding="utf-8") as f: f.write(content) @@ -55,9 +54,6 @@ def generate(config: Config): source_dir = source.parent.relative_to(config.source_dir) output_path = config.build_dir / source_dir / (str(source.stem) + ".html") - with open(md_file, "r", encoding="utf-8") as f: - md_src = f.read() - content = _read_file(source) output = parser.render(content) _write_file(output_path, header + output + footer)