Skip to content

Commit 109d6d0

Browse files
authored
Add sphinx-last-updated-by-git extenstion. (#1807)
* Add sphinx-last-updated-by-git extenstion. Show the last time the page was updated. Useful for docs like AI tools guidelines. Migrate to RTD jobs because we cannot have both command and jobs in rtd.
1 parent 1a89c09 commit 109d6d0

3 files changed

Lines changed: 15 additions & 6 deletions

File tree

.readthedocs.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@ build:
1313
tools:
1414
python: "3"
1515

16-
commands:
17-
- asdf plugin add uv
18-
- asdf install uv latest
19-
- asdf global uv latest
20-
- make dirhtml BUILDDIR=_readthedocs
21-
- mv _readthedocs/dirhtml _readthedocs/html
16+
jobs:
17+
post_checkout:
18+
- git fetch --unshallow || true
19+
build:
20+
html:
21+
- asdf plugin add uv
22+
- asdf install uv latest
23+
- asdf global uv latest
24+
- make dirhtml BUILDDIR=_readthedocs
25+
- mkdir -p $READTHEDOCS_OUTPUT
26+
- mv _readthedocs/dirhtml $READTHEDOCS_OUTPUT/html

conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
'sphinx.ext.todo',
1111
'sphinx_copybutton',
1212
'sphinx_inline_tabs',
13+
'sphinx_last_updated_by_git',
1314
'sphinxext.opengraph',
1415
'sphinxext.rediraffe',
1516
]
1617

18+
html_last_updated_fmt = '%b %d, %Y'
19+
1720
# The master toctree document.
1821
master_doc = 'index'
1922

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ jinja2
33
linklint
44
sphinx-autobuild>=2025.8.25
55
sphinx-inline-tabs>=2025.12.21.14
6+
sphinx-last-updated-by-git>=0.3.8
67
sphinx-lint==1.0.2
78
sphinx-notfound-page>=1.1.0
89
sphinx_copybutton>=0.5.2

0 commit comments

Comments
 (0)