textproc/py-sphinx-last-updated-by-git: Add py-sphinx-last-updated-by-git 0.3.8

This is a little Sphinx extension that does exactly that. It also checks for
included files and other dependencies and uses their "last updated" time if it's
more recent. For each file, the "author date" of the Git commit where it was
last changed is taken to be its "last updated" time. Uncommitted changes are
ignored.

If a page doesn't have a source file, its last_updated time is set to None.

The default value for html_last_updated_fmt is changed from None to the empty
string.
This commit is contained in:
Po-Chuan Hsieh
2025-06-29 19:26:13 +08:00
parent d88d4f56f7
commit 6dcf3e31b6
4 changed files with 39 additions and 0 deletions
+1
View File
@@ -1606,6 +1606,7 @@
SUBDIR += py-sphinx-inline-tabs
SUBDIR += py-sphinx-intl
SUBDIR += py-sphinx-issues
SUBDIR += py-sphinx-last-updated-by-git
SUBDIR += py-sphinx-markdown-tables
SUBDIR += py-sphinx-material
SUBDIR += py-sphinx-me
@@ -0,0 +1,25 @@
PORTNAME= sphinx-last-updated-by-git
PORTVERSION= 0.3.8
CATEGORIES= textproc python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= sphinx_last_updated_by_git-${PORTVERSION}
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Get the "last updated" time for each Sphinx page from Git
WWW= https://github.com/mgeier/sphinx-last-updated-by-git
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=40.8.0:devel/py-setuptools@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= git:devel/git \
${PYTHON_PKGNAMEPREFIX}sphinx>=1.8,1:textproc/py-sphinx@${PY_FLAVOR}
USES= python
USE_PYTHON= autoplist concurrent pep517
NO_ARCH= yes
.include <bsd.port.mk>
@@ -0,0 +1,3 @@
TIMESTAMP = 1750954098
SHA256 (sphinx_last_updated_by_git-0.3.8.tar.gz) = c145011f4609d841805b69a9300099fc02fed8f5bb9e5bcef77d97aea97b7761
SIZE (sphinx_last_updated_by_git-0.3.8.tar.gz) = 10785
@@ -0,0 +1,10 @@
This is a little Sphinx extension that does exactly that. It also checks for
included files and other dependencies and uses their "last updated" time if it's
more recent. For each file, the "author date" of the Git commit where it was
last changed is taken to be its "last updated" time. Uncommitted changes are
ignored.
If a page doesn't have a source file, its last_updated time is set to None.
The default value for html_last_updated_fmt is changed from None to the empty
string.