Skip to main content

Sitemap generator for Sphinx

Project description

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.

Build Status PyPI version License: BSD

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']

Set the value of gitstamp_fmt in conf.py to the desired date format. For example:

# Date format for git timestamps
gitstamp_fmt = "%b %d %Y"

Add gitstamp to the template, for example:

{%- if gitstamp %} Last updated on {{ gitstamp }} {%- endif %}

You will need the gitpython python package for performing datestamp operations:

pip install gitpython

See Who Is Using It

You can use GitHub search or libraries.io to see who is using sphinx-sitemap.

Contributing

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

Maintaining PyPI Version

These are the steps, to be run by the maintainer, for making a new Python package release.

  1. Rev versions in sphinx_gitstamp/version.py and setup.py.

  2. Update CHANGELOG.md

  3. Create a tag and push to GitHub:

    git tag -a vX.Y.Z -m "Release vX.Y.Z"
    git push --tags origin master
  4. Create latest distribution locally:

    python setup.py sdist
  5. Upload to the test pypi.org repository:

    twine upload --repository-url https://test.pypi.org/legacy/ dist/*
  6. Upload to the production pypi.org repository:

    twine upload dist/*

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/).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx-gitstamp-0.1.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page