Skip to main content

A Sphinx extension that inserts a git datestamp into the context as gitstamp, to make it available for template use in HTML versions of your Sphinx documentation.

PyPI version Downloads Code style: Black Parallel Safe

Installing

Directly install via pip by using:

pip install sphinx-gitstamp

Add sphinx_gitstamp to the extensions array in your Sphinx conf.py. For example:

extensions = ['sphinx_gitstamp']

To change the default time format of %b %d, %Y, set the value of gitstamp_fmt in conf.py to the desired time format. For example:

# Date format for git timestamps
gitstamp_fmt = "%Y-%m-%d %H:%M:%S %z"

Add gitstamp to the jinja template, for example:

{%- if gitstamp %} This page was last updated on {{ gitstamp }}. {%- endif %}

Contributing

Pull Requests welcome! See CONTRIBUTING for instructions on how best to contribute.

License

sphinx-gitstamp is made available under a BSD license; see LICENSE for details.

Originally based on the gitstamp generator in the cyrus-imapd project. This product includes software developed by Computing Services at Carnegie Mellon University (http://www.cmu.edu/computing/).

Release files for sphinx-gitstamp 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-gitstamp 0.4.0
File Size Uploaded
sphinx-gitstamp-0.4.0.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-gitstamp 0.4.0
File Interpreter ABI Platform
sphinx_gitstamp-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.7 kB

Release files / sphinx-gitstamp-0.4.0.tar.gz

Download URL sphinx-gitstamp-0.4.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ef88b78cba7a1507455f47bbbfc2f073529b3bb2029eef974dbd5357ff9afc49
BLAKE2b-256 checksum
How to use checksums
35bc286392c851b0ce65163b4c4e5bb9bca3b6b33198f990ce9f3756797554a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.26.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

Release files / sphinx_gitstamp-0.4.0-py3-none-any.whl

Download URL sphinx_gitstamp-0.4.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0a32a0033ebeb1b65f6cd41e10a92c16ca4633dbab44e6841016369adab5160
BLAKE2b-256 checksum
How to use checksums
5c7e4af3cf990b4cd5df43d764c9474a214537cf0ec5109ec2f6c64121d4ae46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.26.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page