Skip to content

Infra: Move "Source" and "Last modified" from <article> to <footer>#4977

Open
hugovk wants to merge 1 commit into
python:mainfrom
hugovk:move-to-footer
Open

Infra: Move "Source" and "Last modified" from <article> to <footer>#4977
hugovk wants to merge 1 commit into
python:mainfrom
hugovk:move-to-footer

Conversation

@hugovk
Copy link
Copy Markdown
Member

@hugovk hugovk commented May 19, 2026

Looking at PRs like #4973, the Read the Docs comment says something like:

701 files changed · ± 701 modified

And lists all the PEPs. This is because they contain a "Last modified" timestamp in the footer.

For the RTD build, we're not fetching the whole commit history, so it's setting the last modified time as a recent time rather than the real last modified time. This doesn't really matter for the previews, better to have faster builds.

Right now, the PEP html structure is like:

<header></header>
<article>
  <section id="pep-content">/<section>
  <hr>
  <p>Source: ...</p>
  <p>Last modified: ...</p>
</article>
<nav id="pep-sidebar"></nav>

We could configure RTD to ignore the bit of HTML containing the timestamp, but RTD already ignores changes in a <footer>, and these things also semantically belong in a <footer>, which should also improve navigation for screen readers and so on.

Therefore this PR moves "Source" and "Last modified" to a <footer>:

<header></header>
<article>
  <section id="pep-content">/<section>
</article>
<nav id="pep-sidebar"></nav>
<footer>
  <p>Source: ...</p>
  <p>Last modified: ...</p>
</footer>

Also show the timestamp as "UTC" not "GMT": https://www.timeanddate.com/time/gmt-utc-time.html

@hugovk hugovk requested a review from AA-Turner as a code owner May 19, 2026 12:11
@hugovk hugovk added the infra Core infrastructure for building and rendering PEPs label May 19, 2026
@read-the-docs-community
Copy link
Copy Markdown

@hugovk
Copy link
Copy Markdown
Member Author

hugovk commented May 19, 2026

735 files changed · ± 735 modified

Hmmm... 🤣

@hugovk hugovk marked this pull request as draft May 19, 2026 12:32
@hugovk
Copy link
Copy Markdown
Member Author

hugovk commented May 19, 2026

And of course, main still has timestamps in <article>, not <footer>, so we'll have to merge this first.

@hugovk hugovk marked this pull request as ready for review May 19, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra Core infrastructure for building and rendering PEPs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant