From 34df950cbd6830eca980d3ac03fcd15834524be1 Mon Sep 17 00:00:00 2001 From: omicron Date: Fri, 28 Aug 2026 01:08:58 +0200 Subject: [PATCH] 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 --- omicron/ssg/site.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/omicron/ssg/site.py b/omicron/ssg/site.py index 1312112..1838e07 100644 --- a/omicron/ssg/site.py +++ b/omicron/ssg/site.py @@ -185,7 +185,8 @@ class Site: self.other_outputs.append(pygments) self.add_by_path(pygments) 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): content = create_content(self, file) if content.draft and not self.drafts: