Skip to content

Commit 295612d

Browse files
authored
Show last_updated in docs (#1888)
* Show last_updated in docs * Use sphinx-last-updated-by-git * Set fetch-depth: 0
1 parent b3604a6 commit 295612d

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.github/workflows/sphinx.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
steps:
3434
- name: Checkout Repo ⚡️
3535
uses: actions/checkout@v3
36+
with:
37+
fetch-depth: 0
3638

3739
- name: Set Up Python 🐍
3840
uses: actions/setup-python@v4

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@
4848
"text": html_title,
4949
},
5050
}
51+
html_last_updated_fmt = "%Y-%m-%d"
5152

52-
extensions = ["myst_parser", "sphinx_copybutton"]
53+
extensions = ["myst_parser", "sphinx_copybutton", "sphinx_last_updated_by_git"]
5354
source_suffix = {
5455
".rst": "restructuredtext",
5556
".md": "markdown",

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ myst-parser>=0.18.0
55
sphinx>=4.5.0
66
sphinx-book-theme==1.0.0
77
sphinx-copybutton>=0.5.0
8+
sphinx-last-updated-by-git>=0.3.4

0 commit comments

Comments
 (0)