https://badgen.net/runkit/amio/cal-badge/Asia/Shanghai
──┬─ ────┬──── ──┬──────────
│ │ └─ path-args (optional)
│ notebook
│
owner
https://runkit.com/home#endpoint
If you are not familiar with RunKit endpoint, this guide would help.
Create a RunKit notebook (e.g. https://runkit.com/amio/cal-badge), which gives you an endpoint:
https://runkit.io/amio/cal-badge/branches/master
it returns a JSON like:
{
"subject": "2019",
"status": "6-1",
"color": "blue"
}
Construct badgen url using owner
and notebook
params:
https://badgen.net/runkit/amio/cal-badge
That's it:
Furthermore, you can append arbitrary path args (e.g. /Asia/Shanghai
) to the end of badgen url, Badgen will request RunKit endpoint with that. This badge:
https://badgen.net/runkit/amio/cal-badge/Asia/Shanghai
represents data from:
https://runkit.io/amio/cal-badge/branches/master/Asia/Shanghai
/runkit/:owner/:notebook/:path*