Skip to main content

MkDocs plugin to display the latest version based on git tags.

Project description


Plugin for MKDocs to inject a Git Tag into the markdown. The primary purpose is to allow an MKDocs site, in the same repository as the application in GitHub, to display the latest released version, based on the git tags.

Origin and Purpose

This plugin was specifically created to support GitHub projects using GitHub Pages and mkdocs to publish documentation which also use tags to mark releases. Case in point is authoring Jenkins shared libraries and associated documentation. The shared libraries are cloned by consumers using a the repository source and a git tag to specify the version. Documentation for the shared library lives within the same repository, so ensuring documentation is updated can be part of the Pull Request/review process, however not all merges to master are released. It was initially useful to refer to the latest release version in the documentation, but this quickly went out of date, as not all merges to master were released, so it was not practical to maintain this manually, and in generally nothing should be maintained manually that doesn't have to be. Hence the need for this plugin to MKDocs which is used in the automated build and release process for our Jenkins shared library code.


pip install mkdocs_latest_release_plugin


Enable the plugin in mkdocs.yml

  - search
  - git-latest-release

Add {{ git_latest_release }} anywhere in the markdown where you want to refer to the latest release tag. Release tags are presumed to be semantic version tags, therefore matching the regex \d+\.\d+\.\d+.

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_latest_release_plugin-0.1.2.tar.gz (2.8 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page