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
Metadata
Release files for mkdocs-latest-git-tag-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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mkdocs_latest_git_tag_plugin-0.1.2.tar.gz | 3.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mkdocs_latest_git_tag_plugin-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.2 kB
Release files / mkdocs_latest_git_tag_plugin-0.1.2.tar.gz
| Download URL | mkdocs_latest_git_tag_plugin-0.1.2.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab51de9aaaf412110ce1935d4c22686c23383d2078feb28708646c3801d89327
|
|
BLAKE2b-256 checksum How to use checksums |
fed014db15da4f526392603729768e8f961e9e16d52db5e48892437c6e912262
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.0 CPython/3.10.7 Linux/5.19.0-45-generic
|
Release files / mkdocs_latest_git_tag_plugin-0.1.2-py3-none-any.whl
| Download URL | mkdocs_latest_git_tag_plugin-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d27c6d95e19f8fc9133840492ed059ac1b026e0d0dce4c368b803b9367f5a07
|
|
BLAKE2b-256 checksum How to use checksums |
a277960575f50d2ad6f996066000081038771bb7caf5a810fd8eb3f87c6a472a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.0 CPython/3.10.7 Linux/5.19.0-45-generic
|
Security for mkdocs-latest-git-tag-plugin 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.