https://github.com/sphinx-contrib/scm
Sphinx SCM interface
https://github.com/sphinx-contrib/scm
Last synced: 7 days ago
JSON representation
Sphinx SCM interface
- Host: GitHub
- URL: https://github.com/sphinx-contrib/scm
- Owner: sphinx-contrib
- License: gpl-3.0
- Created: 2020-09-22T20:56:30.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-31T20:08:24.000Z (about 1 month ago)
- Last Synced: 2025-03-31T21:23:46.903Z (about 1 month ago)
- Language: Python
- Size: 50.8 KB
- Stars: 7
- Watchers: 3
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
sphinxcontrib-scm
=================|badge:pypi-version| |badge:py-versions|
|badge:pre-commit| |badge:pre-commit.ci|
|badge:black| |badge:prettier|.. |badge:pypi-version| image:: https://img.shields.io/pypi/v/sphinxcontrib-scm.svg
:target: https://pypi.org/project/sphinxcontrib-scm
:alt: [Latest PyPI version]
.. |badge:py-versions| image:: https://img.shields.io/pypi/pyversions/sphinxcontrib-scm.svg
:target: https://pypi.org/project/sphinxcontrib-scm
:alt: [Supported Python versions]
.. |badge:pre-commit| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen.svg?logo=pre-commit&logoColor=white
:target: https://github.com/pre-commit/pre-commit
:alt: [pre-commit: enabled]
.. |badge:pre-commit.ci| image:: https://results.pre-commit.ci/badge/github/sphinx-contrib/scm/master.svg
:target: https://results.pre-commit.ci/latest/github/sphinx-contrib/scm/master
:alt: [pre-commit.ci status]
.. |badge:black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: [Code style: black]
.. |badge:prettier| image:: https://img.shields.io/badge/code_style-prettier-ff69b4.svg
:target: https://github.com/prettier/prettier
:alt: [Code style: prettier]This package provides ``sphinxcontrib.scm``, a simple SCM interface for Sphinx-based
documentation.Installation
------------1. ``pip install sphinxcontrib-scm``
Configuration
-------------1. Add ``'sphinxcontrib.scm'`` to the ``extensions`` list in ``conf.py``.
.. code::
extensions = [ 'sphinxcontrib.scm' ]
2. Configure in ``conf.py``
.. code::
scm_contribs_email = ["true"|"false"] # Show email. Default: "true"
scm_contribs_limit_contributors" = [None|int] # Limit number of contributors. Use None
# to deactivate. Default: None
scm_contribs_min_commits = int # Filter by number of commits. Default: 0
scm_contribs_sort = ["name"|"num"] # Sort by name or number of commits.
# Default: "name"
scm_contribs_type = ["author"|"committer"] # Show info of author or committer.
# Default: "author"Usage
-----Directive
^^^^^^^^^.. code::
.. scm-sectionauthor::
:email: [true|false]
:limit_contributors: []
:min_commits: []
:sort: [name|num]
:type: [author|committer]Populates ``sectionauthor`` directive with a list of SCM contributors. All options are
optional and override the config settings in ``conf.py``.Role
^^^^.. code::
:scm-contribs:`.`
Can be used inline (eg as content for the ``sectionauthor`` directive). Currently, email
addresses are not converted into mailto links.