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)