This is a mkdocs-macros plugin that shows the git tag of the latest version.
The default git.tag
variable will match any git tag which might not work with your git workflow (for example). This plugin adds a new variable git_tag_version
that looks only for tags matching the pattern v*
.
pip install git+https://github.com/itaysk/mkdocs-macros-gittagversion
# OR
# python3 mkdocs-macros-gittagversion/setup.py install
In mkdocs.yml
:
plugins:
- macros:
modules: ["mkdocs_macros_gittagversion"]
In your docs markdown
This is version {{ git_tag_version }}