Change Content and Index to create pretty urls

This commit is contained in:
2026-08-24 14:45:23 +02:00
parent 7a1926113c
commit 1250ead61a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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