MkDocs plugin to display the latest version based on git tags.
Project description
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+
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mkdocs_latest_release_plugin-0.1.2.tar.gz
.
File metadata
- Download URL: mkdocs_latest_release_plugin-0.1.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f17693cf35fd3500d85dc9a69bc402442551fcd5a5123c20cc8e66fb07b149cb |
|
MD5 | 7d6768bce1e74a8e23dbbdc751b0bd41 |
|
BLAKE2b-256 | 4a15627a75230f3333e228586294716ae9435a09877de9f802eb65470fa8462e |
File details
Details for the file mkdocs_latest_release_plugin-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: mkdocs_latest_release_plugin-0.1.2-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b53527f29c917d6ba910e6ac40209c929e05ec713f91e9d9edb5693dbcfef75 |
|
MD5 | 24ca0965826fd7389a8b155a592c959a |
|
BLAKE2b-256 | fcd021dc7263c65c6940cfa947912931180f3d19da24f4d6a46c9e1c06440755 |