Skip to content

Instantly share code, notes, and snippets.

@gotofritz
gotofritz / add_slugs_to_markdown.py
Created August 18, 2025 18:54
Goes through all the markdown files in a folder and adds the yyyy-mm-dd- prefix to the filename, both in the slug: in the front matter and the filename
"""
Goes through all the markdown files in a folder and adds the
yyyy-mm-dd- prefix to the filename, in the slug: in the
front matter
"""
#!/usr/bin/env python3
import os
import re
import sys