sphinx-last-updated-by-git
Get the "last updated" time for each Sphinx page from Git
What it is and what it does
This is a Sphinx extension that automatically populates the last-updated timestamp for each documentation page by querying Git commit history. Instead of manually setting update dates, the extension inspects the Git author date of the most recent commit that changed each source file, and also checks included files and dependencies to use their timestamp if more recent. The extension respects Git's tracked-file status and can be configured to handle auto-generated files, exclude patterns, and timezone preferences.
The extension integrates directly into Sphinx's build process and requires only that your documentation source is in a Git repository. It handles edge cases like shallow clones (common on Read the Docs and GitHub Actions) by setting the timestamp to None and optionally warning during the build. Configuration options allow you to control dependency checking, source links for untracked files, timezone display, HTML metatag generation, and exclusion patterns for both files and commits.
Use it for:
- Display accurate last-modified dates in Sphinx documentation footers without manual maintenance.
- Track which pages in a large documentation project have been recently updated or are stale.
- Automatically include dependency changes (e.g., included snippets or generated content) in page freshness calculations.
- Exclude specific files or commits from affecting the last-updated timestamp for auto-generated or frequently-touched files.
- Configure timezone-aware timestamps for international documentation teams using Babel or Python timezone objects.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Sphinx extension that automatically extracts and displays the last-updated timestamp for each documentation page from Git commit history, checking dependencies and included files for more recent changes.
Yes, if you maintain Sphinx documentation in a Git repository and want automatic, accurate last-updated timestamps without manual configuration. The package is actively maintained, has no vulnerabilities, and integrates seamlessly with Sphinx. Be aware that shallow Git clones (common on Read the Docs by default) will cause some files to show no timestamp—this is documented and has a documented workaround.
Install
sphinx-last-updated-by-git on PyPI
pip
pip install sphinx-last-updated-by-gituv
uv add sphinx-last-updated-by-gitpoetry
poetry add sphinx-last-updated-by-gitInstalling sphinx-last-updated-by-git
Before you install
Low install friction with a single runtime dependency on Sphinx. The package is actively maintained with a recent commit history (last commit 2026-07-20) and no known vulnerabilities, making it straightforward to add to an existing Sphinx setup.
License in practice
Licensed under BSD-2-Clause, the same permissive license as Sphinx itself, so there are no licensing constraints on use in commercial or open-source projects.
Quickstart
pip install sphinx-last-updated-by-git
# In conf.py:
extensions = ['sphinx_last_updated_by_git']
# Then run: sphinx-build -b html source build/html
Requires Git to be installed and the documentation source to be in a Git repository; shallow clones may cause some files to have no last-updated time.
Verify before relying
- Whether the extension works correctly with all Sphinx themes or only specific ones (e.g., sphinx_rtd_theme compatibility details).
- Performance impact when processing large documentation projects with many files and dependencies.
Package facts
| License | BSD-2-Clause (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — sphinx |
| Maintenance | actively maintained — 733 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 555,428/month — #6,026 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sphinx_last_updated_by_git-0.3.8-py3-none-any.whl
Keywords: Sphinx, Git
Tags
More Sphinx packages
Parses Python docstrings in ReST, Google,…
permissive · top 1,000 on PyPI
SphinxSphinx generates professional documentation…
permissive · top 1,000 on PyPI
sphinxcontrib-serializinghtmlA Sphinx extension that outputs documentation…
permissive · top 1,000 on PyPI
alabasterAlabaster is a clean, responsive Sphinx theme…
permissive · top 1,000 on PyPI
sphinxcontrib-htmlhelpA Sphinx extension that generates HTML help…
permissive · top 1,000 on PyPI
sphinxcontrib-qthelpA Sphinx extension that converts documentation…
permissive · top 1,000 on PyPI
readthedocs-sphinx-searchA Sphinx extension that adds real-time…
permissive · top 15,000 on PyPI
sphinx-clickSphinx-click is a Sphinx extension that…
permissive · top 15,000 on PyPI
sphinxcontrib-googleanalyticsAdds Google Analytics tracking to…
permissive · top 15,000 on PyPI
sphinx-issuesA Sphinx extension that adds roles for linking…
permissive · top 15,000 on PyPI
autodocsummA Sphinx extension that enhances autodoc with…
permissive · top 5,000 on PyPI
sphinx-reredirectsSphinx extension that generates HTML redirect…
unclear · top 5,000 on PyPI
sphinx-notfound-pageA Sphinx extension that generates a custom 404…
permissive · top 5,000 on PyPI
mkdocs-git-revision-date-localized-pluginA MkDocs plugin that displays the date of the…
permissive · top 5,000 on PyPI
sphinx-press-themeA modern, responsive Sphinx documentation theme…
permissive · top 15,000 on PyPI
sphinxext-rediraffeA Sphinx extension that automatically redirects…
permissive · top 15,000 on PyPI