Skip to main content

mkdocs_latest_release_plugin

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.

Install

pip install mkdocs_latest_release_plugin

Usage

Enable the plugin in mkdocs.yml

plugins:
  - 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+.

Metadata

Release files for mkdocs-latest-release-plugin 0.1.2

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

Source distribution (sdist)

Source distribution for mkdocs-latest-release-plugin 0.1.2
File Size Uploaded
mkdocs_latest_release_plugin-0.1.2.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-latest-release-plugin 0.1.2
File Interpreter ABI Platform
mkdocs_latest_release_plugin-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 19.8 kB

Release files / mkdocs_latest_release_plugin-0.1.2.tar.gz

Download URL mkdocs_latest_release_plugin-0.1.2.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f17693cf35fd3500d85dc9a69bc402442551fcd5a5123c20cc8e66fb07b149cb
BLAKE2b-256 checksum
How to use checksums
4a15627a75230f3333e228586294716ae9435a09877de9f802eb65470fa8462e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

Release files / mkdocs_latest_release_plugin-0.1.2-py3-none-any.whl

Download URL mkdocs_latest_release_plugin-0.1.2-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b53527f29c917d6ba910e6ac40209c929e05ec713f91e9d9edb5693dbcfef75
BLAKE2b-256 checksum
How to use checksums
fcd021dc7263c65c6940cfa947912931180f3d19da24f4d6a46c9e1c06440755
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

3 release files

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