diff --git a/scripts/maketitle.py b/scripts/maketitle.py index d3f6dc20e14c50d3e04eb702505a515977369542..562642d1c6e9db3225c31ead0fd1b05d2600486e 100644 --- a/scripts/maketitle.py +++ b/scripts/maketitle.py @@ -41,7 +41,7 @@ def process_md_file(md_path): if match: title = match.group(1).strip() frontmatter = f'---\ntitle: "{title}"\n---\n' - + # Construct new content with frontmatter at beginning before_h1 = content[:match.start()].lstrip('\n') after_h1 = content[match.end():].lstrip('\n') @@ -63,7 +63,7 @@ def process_md_file(md_path): mdx_path = md_path.with_suffix('.mdx') with open(mdx_path, 'w', encoding='utf-8') as file_handle: file_handle.write(new_content) - + # Remove original MD file md_path.unlink() print(f"Converted {md_path} to {mdx_path}")