Skip to content

Commit

Permalink
docs: set html_last_updated_fmt to format string
Browse files Browse the repository at this point in the history
According to the Sphinx documentation and source code,
html_last_updated_fmt is supposed to be a strftime()-like format string,
not a literal string with a date.

Instead of datetime.now().isoformat, set this to the equivalent format
string (sans microseconds, as Sphinx does not support %f).

This is a no-op generally. However, unlike our implementation here,
Sphinx's date generation obeys SOURCE_DATE_EPOCH, which means that the
builds will now be able to be built reproducibly.

Fixes #53

Signed-off-by: Faidon Liambotis <paravoid@debian.org>
  • Loading branch information
paravoid committed Mar 10, 2023
1 parent 4fbe478 commit 086d940
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
master_doc, source_suffix = "index", ".rst"

html_theme = "furo"
html_title, html_last_updated_fmt = "pyproject-api docs", datetime.now().isoformat()
html_title, html_last_updated_fmt = "pyproject-api docs", "%Y-%m-%dT%H:%M:%S"
pygments_style, pygments_dark_style = "sphinx", "monokai"

autoclass_content, autodoc_typehints = "both", "none"
Expand Down

0 comments on commit 086d940

Please sign in to comment.