diff --git a/build.py b/build.py index b595687..9196ef3 100644 --- a/build.py +++ b/build.py @@ -61,7 +61,7 @@ def build_posts(): raise SystemExit(f"{path.name}: expected a YYYY-MM-DD-slug.md filename") date, slug = match.groups() title, body = read(path) - url = f"/posts/{slug}/" + url = f"/{date.replace('-', '/')}/{slug}/" write(url, page(f"{title} — {SITE_TITLE}", render("post.html", title=html.escape(title), date=date, body=body))) posts.append({"title": title, "date": date, "url": url, "body": body})