Skip to main content

Mkdocs plugin to display git authors of a page

Project description

Actions Status PyPI - Python Version PyPI PyPI - Downloads codecov GitHub contributors PyPI - License

mkdocs-git-authors-plugin

Lightweight MkDocs plugin to display git authors of a markdown page:

Authors: Jane Doe, John Doe

See the demo. The plugin only considers authors of the current lines in the page ('surviving code' using git blame).

Other MkDocs plugins that use information from git:

Setup

Install the plugin using pip3:

pip3 install mkdocs-git-authors-plugin

Next, add the following lines to your mkdocs.yml:

plugins:
  - search
  - git-authors

If you have no plugins entry in your config file yet, you'll likely also want to add the search plugin. MkDocs enables it by default if there is no plugins entry set.

You can then use the {{ git_page_authors }} tag in your markdown document, or choose to customize your mkdocs theme (see usage page in the docs).

Note when using build environments

This plugin needs access to the last commit that touched a specific file to be able to retrieve the date. By default many build environments only retrieve the last commit, which means you might need to:

Change your CI settings
  • github actions: set fetch_depth to 0 (docs)
  • gitlab runners: set GIT_DEPTH to 1000 (docs)
  • bitbucket pipelines: set clone: depth: full (docs)

Documentation

See timvink.github.io/mkdocs-git-authors-plugin

Contributing

Very much open to contributions! Please read contributing guide before putting in any work.

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

mkdocs-git-authors-plugin-0.6.5.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

mkdocs_git_authors_plugin-0.6.5-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs-git-authors-plugin-0.6.5.tar.gz.

File metadata

File hashes

Hashes for mkdocs-git-authors-plugin-0.6.5.tar.gz
Algorithm Hash digest
SHA256 5e10d1685745e128b0bc88e229c13cf62bab2b5a1b716b68301216b94e206bd4
MD5 b7f19581a084b7637681ba39fac06858
BLAKE2b-256 d029abccdfb11f86ca177e5c1a34788af056f459713276f493769db33644d684

See more details on using hashes here.

Provenance

File details

Details for the file mkdocs_git_authors_plugin-0.6.5-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_git_authors_plugin-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b82aad1a476a673d0746e8ce5ccccbd39822fc730ef0a6a113ec8517d30016fc
MD5 3cd0f17e22ea0964907bd9b75119dcb1
BLAKE2b-256 47a2a3bd0f0209a4b306c034d776410b561815b7ee977b329d79a8969659a38f

See more details on using hashes here.

Provenance

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