Coder Social home page Coder Social logo

seapagan / mkdocs-latest-git-tag-plugin Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.3 MB

MkDocs Plugin to insert the latest Tag from the current Git repository

Home Page: https://seapagan.github.io/mkdocs-latest-git-tag-plugin/

License: MIT License

Python 100.00%
git mkdocs plugin tags mkdocs-plugin

mkdocs-latest-git-tag-plugin's Introduction

MkDocs Plugin : latest-git-tag

PyPI version

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 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:

# 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.