Skip to content

Conversation

@achow101
Copy link
Member

Implements #1162

It turns out the build was not entirely deterministic as the build time and timezone of the building machine would be included in several places. The first several commits makes it so that those timestamps use the commit timestamp.

After including all of the generated HTML, the CI is changed to check that it replicates the HTML that is in the repo.

Lastly, the build has had a deprecation warning which is resolved in the last commit. No HTML changes to fix that warning.

@katesalazar

This comment was marked as off-topic.

@glozow
Copy link
Member

glozow commented Oct 29, 2025

Determinism is nice. What would we need to do differently before we open a PR?

@achow101
Copy link
Member Author

What would we need to do differently before we open a PR?

Just building the site and committing the result. Can be done easily with make.

@glozow
Copy link
Member

glozow commented Oct 29, 2025

Can you write a doc for it, e.g. in CONTRIBUTING.md?

We want to set the last updated time for all pages to the timestamp of
the last commit that modified the page. This is achieved with the use of
a custom plugin that queries that information and adds it as a variable.
The lastmod attribute stores the time that a page was last modified. All
pages have a git-last-modified-date variable that accurately reflects
the time of the last modification.
Use git-last-modified-date for the updated time in the atom feeds.
@achow101
Copy link
Member Author

Can you write a doc for it, e.g. in CONTRIBUTING.md?

Done.

Also rebased.

@fanquake
Copy link
Member

Am I understanding correctly that if I checkout this PR, and run make build, there should be no diff generated? As that currently isn't the case.

@achow101
Copy link
Member Author

Am I understanding correctly that if I checkout this PR, and run make build, there should be no diff generated? As that currently isn't the case.

It's supposed to. What does your diff look like?

When multiple posts are made on the same date, sorting by date does not
define the sort order within those dates. By sorting by name first, we
set the sort order for such posts.

Sorting by name is reversed in order to preserve the order seen on the
site.

-BEGIN VERIFY SCRIPT-
sed -i -e 's;sort: "date";sort: "name" | reverse | sort: "date";' $(git grep --name-only 'sort: "date"')
-END VERIFY SCRIPT-
With html being committed, there's no need to ensure that debian can
build the site.
@achow101
Copy link
Member Author

I think the non-determinism was because of sort order for posts made on the same date. Latest push should fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants