MkDocs plugin to get the latest git tag from the local repository
Project description
MkDocs Plugin : latest-git-tag
This is a simple MkDocs plugin that just gets the
most recent Tag from the local Git repository and makes it available as a
markdown tag in the template.
The idea behind this is that GitHub uses the Tag to name the release and,
therefore we can use it to display the version of the documentation that
corresponds to the release.
The Tag is just returned as a string with no formatting applied. If none is found, it returns "No Tags found"
There is a Demo Site
Installation
Install the package with pip:
pip install mkdocs-latest-git-tag-plugin
or, if you are using Poetry:
poetry add mkdocs-latest-git-tag-plugin --group dev
Usage
Activate the plugin in your mkdocs.yml:
plugins:
- latest-git-tag
If you have no
pluginsentry in your config file yet, you'll likely also want to add thesearchplugin. MkDocs enables it by default if here is nopluginsentry set.
Then, in your template, you can use the {{ latest_git_tag }} variable:
# My Project
Version: {{ latest_git_tag }}
The spaces around the tag are optional and it is case insensitive.
Configuration
At this time there are no configuration options.
License
This is released under the MIT License. See the bundled LICENSE file for more details.
TODO
- Add tests
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkdocs_latest_git_tag_plugin-0.1.2.tar.gz.
File metadata
- Download URL: mkdocs_latest_git_tag_plugin-0.1.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.0 CPython/3.10.7 Linux/5.19.0-45-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab51de9aaaf412110ce1935d4c22686c23383d2078feb28708646c3801d89327
|
|
| MD5 |
c82a2478024f85677b086e776d3269da
|
|
| BLAKE2b-256 |
fed014db15da4f526392603729768e8f961e9e16d52db5e48892437c6e912262
|
File details
Details for the file mkdocs_latest_git_tag_plugin-0.1.2-py3-none-any.whl.
File metadata
- Download URL: mkdocs_latest_git_tag_plugin-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.0 CPython/3.10.7 Linux/5.19.0-45-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d27c6d95e19f8fc9133840492ed059ac1b026e0d0dce4c368b803b9367f5a07
|
|
| MD5 |
4af444d80beb815994285063070a471b
|
|
| BLAKE2b-256 |
a277960575f50d2ad6f996066000081038771bb7caf5a810fd8eb3f87c6a472a
|