Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seapagan/mkdocs-latest-git-tag-plugin
MkDocs Plugin to insert the latest Tag from the current Git repository
https://github.com/seapagan/mkdocs-latest-git-tag-plugin
git mkdocs mkdocs-plugin plugin tags
Last synced: about 2 months ago
JSON representation
MkDocs Plugin to insert the latest Tag from the current Git repository
- Host: GitHub
- URL: https://github.com/seapagan/mkdocs-latest-git-tag-plugin
- Owner: seapagan
- License: mit
- Created: 2023-06-20T14:37:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-17T20:39:17.000Z (over 1 year ago)
- Last Synced: 2024-11-16T17:42:19.885Z (3 months ago)
- Topics: git, mkdocs, mkdocs-plugin, plugin, tags
- Language: Python
- Homepage: https://seapagan.github.io/mkdocs-latest-git-tag-plugin/
- Size: 1.27 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# MkDocs Plugin : `latest-git-tag`
[![PyPI version](https://badge.fury.io/py/mkdocs-latest-git-tag-plugin.svg)](https://badge.fury.io/py/mkdocs-latest-git-tag-plugin)
This is a simple [MkDocs](https://www.mkdocs.org/) 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](https://seapagan.github.io/mkdocs-latest-git-tag-plugin/)
## Installation
Install the package with pip:
```bash
pip install mkdocs-latest-git-tag-plugin
```or, if you are using [Poetry](https://python-poetry.org):
```bash
poetry add mkdocs-latest-git-tag-plugin --group dev
```## Usage
Activate the plugin in your `mkdocs.yml`:
```yaml
plugins:
- latest-git-tag
```> If you have no `plugins` entry in your config file yet, you'll likely also
want to add the `search` plugin. MkDocs enables it by default if here is no
`plugins` entry set.Then, in your template, you can use the `{{ latest_git_tag }}` variable:
```markdown
# My ProjectVersion: {{ 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