MkDocs plugin that converts shorthand placeholders to full Uptime Kuma badge links
Project description
MkDocs Kuma Uptime Badge Plugin
A tiny MkDocs plugin that converts shorthand placeholders to full Uptime Kuma badge links during the build.
Installation
Using pip:
pip install mkdocs-kuma-uptime-badge
Using Poetry:
poetry add mkdocs-kuma-uptime-badge
For development:
# Clone the repository
git clone https://github.com/culturepulse/mkdocs-kuma-uptime-badge.git
cd mkdocs-kuma-uptime-badge
# Install with Poetry (recommended)
poetry install
# Or with pip
pip install -e .
Usage
- Add the plugin to your
mkdocs.yml:
plugins:
- search
- kuma-uptime-badge:
base_url: https://your-kuma-instance.example.com
- In your Markdown files, use the shorthand syntax:
{{uptime id=1}} # Basic status badge
{{uptime id=2 type=uptime hours=24}} # Uptime badge for the last 24 hours
{{uptime id=3 type=ping hours=720 label="30" labelSuffix="d"}} # Ping badge with custom label
These will be converted to full Markdown image links during the build:



Syntax
The general syntax for the shorthand is:
{{uptime id=<monitorID> [type=<badgeType>] [hours=<int>] [key=value ...]}}
Where:
id(required): The monitor ID from Uptime Kumatype(optional): The badge type, one of:status(default)uptimepingavg-responsecert-expresponse
hours(optional): Duration in hours, only used foruptime,ping,avg-response, andresponsebadge types- Additional key-value pairs: Any other parameters will be added as query string parameters to the badge URL
Examples
Status Badge
{{uptime id=1}}
{{uptime id=1 type=status}}
{{uptime id=1 upLabel="Online" downLabel="Offline"}}
{{uptime id=1 upColor="green" downColor="red"}}
Uptime Badge
{{uptime id=1 type=uptime hours=24}}
{{uptime id=1 type=uptime hours=720 label="30" labelSuffix="d"}}
{{uptime id=1 type=uptime hours=24 color="blue"}}
Ping Badge
{{uptime id=1 type=ping hours=24}}
{{uptime id=1 type=ping hours=24 labelPrefix="Average" label="Ping" labelSuffix=""}}
Certificate Expiry Badge
{{uptime id=1 type=cert-exp}}
{{uptime id=1 type=cert-exp warnDays=14 downDays=7}}
Badge Styles
{{uptime id=1 style=flat}} # Default
{{uptime id=1 style=flat-square}}
{{uptime id=1 style=plastic}}
{{uptime id=1 style=for-the-badge}}
{{uptime id=1 style=social}}
Configuration
The plugin supports the following configuration options:
base_url: The base URL of your Uptime Kuma instance (default:https://kuma.intra)
Made with ❤️ and ☕️ by CulturePulse development team
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_kuma_uptime_badge-0.1.0.tar.gz.
File metadata
- Download URL: mkdocs_kuma_uptime_badge-0.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c37245015923b2c105c1c2dacaec800cc86c1b78dddf2192cbb5a9591f52e3f4
|
|
| MD5 |
e827c42eff38e9dba9b5a9e229e47fea
|
|
| BLAKE2b-256 |
81722e5e93846549022cac2266c4cb026fb9999b61f07fc50e200b28b9521d60
|
Provenance
The following attestation bundles were made for mkdocs_kuma_uptime_badge-0.1.0.tar.gz:
Publisher:
publish.yml on culturepulse/mkdocs-kuma-uptime-badge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_kuma_uptime_badge-0.1.0.tar.gz -
Subject digest:
c37245015923b2c105c1c2dacaec800cc86c1b78dddf2192cbb5a9591f52e3f4 - Sigstore transparency entry: 273749732
- Sigstore integration time:
-
Permalink:
culturepulse/mkdocs-kuma-uptime-badge@4202fbfcb97fd4e971cdc90eb1ef1cdff684ddc3 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/culturepulse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4202fbfcb97fd4e971cdc90eb1ef1cdff684ddc3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mkdocs_kuma_uptime_badge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mkdocs_kuma_uptime_badge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92d289fd98123b300b57fba75e4939665c9f731c891b6bd386005ea0428c80bb
|
|
| MD5 |
220cd01c6da5080aa413dd830121842b
|
|
| BLAKE2b-256 |
4b6deaf30fb3c4494cbdb2c1bbcadcfb25b1c36fdfb9f2b1939fa7045a127940
|
Provenance
The following attestation bundles were made for mkdocs_kuma_uptime_badge-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on culturepulse/mkdocs-kuma-uptime-badge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_kuma_uptime_badge-0.1.0-py3-none-any.whl -
Subject digest:
92d289fd98123b300b57fba75e4939665c9f731c891b6bd386005ea0428c80bb - Sigstore transparency entry: 273749742
- Sigstore integration time:
-
Permalink:
culturepulse/mkdocs-kuma-uptime-badge@4202fbfcb97fd4e971cdc90eb1ef1cdff684ddc3 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/culturepulse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4202fbfcb97fd4e971cdc90eb1ef1cdff684ddc3 -
Trigger Event:
release
-
Statement type: