Make site building output deterministic

In order to do snapshot testing of the site output we want the output to
always be the same regardless of how the filesystem tree was created
This commit is contained in:
2026-08-28 01:08:58 +02:00
parent a0fa7d8fe2
commit 34df950cbd
+2 -1
View File
@@ -185,7 +185,8 @@ class Site:
self.other_outputs.append(pygments) self.other_outputs.append(pygments)
self.add_by_path(pygments) self.add_by_path(pygments)
content_path = self.site_path / "content" content_path = self.site_path / "content"
for file in content_path.rglob("*"): files = sorted(content_path.rglob("*"))
for file in files:
if file.is_file() and is_content(file): if file.is_file() and is_content(file):
content = create_content(self, file) content = create_content(self, file)
if content.draft and not self.drafts: if content.draft and not self.drafts: