From 1250ead61a6d78e504d7dc420e88bcba1a589e2c Mon Sep 17 00:00:00 2001 From: omicron Date: Mon, 24 Aug 2026 14:45:23 +0200 Subject: [PATCH] Change Content and Index to create pretty urls --- omicron/ssg/output/content.py | 2 +- omicron/ssg/output/index.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/omicron/ssg/output/content.py b/omicron/ssg/output/content.py index abca242..2b8a90c 100644 --- a/omicron/ssg/output/content.py +++ b/omicron/ssg/output/content.py @@ -42,7 +42,7 @@ class Content(Output): def build_path(section: str, slug: str) -> Path: if not Content._SECTION_RE.match(section): raise ContentError(f"Invalid section '{section}'") - path = Path(f"{section}/{slug}.html") + path = Path(f"{section}/{slug}/index.html") return path def read_body(self) -> str: diff --git a/omicron/ssg/output/index.py b/omicron/ssg/output/index.py index c39d0de..6bff180 100644 --- a/omicron/ssg/output/index.py +++ b/omicron/ssg/output/index.py @@ -44,7 +44,7 @@ class Index(Output): if page_num == 1: file = Path("index.html") else: - file = Path(f"page-{page_num}.html") + file = Path(f"page-{page_num}/index.html") if kind == "root": path = file