Skip to main content

MkDocs Ko-fi Button Plugin

An MkDocs plugin that let's you easily add a Ko-fi buttons with markdown
The plugin looks for Jinja style tags like {{ko-fi}} and replaces it with a Ko-fi button. It is possible to configure the text and color of the button.

Setup

Install the plugin using pip:

pip install mkdocs-ko-fi-button-plugin

Activate the plugin in mkdocs.yml:

plugins:
    - search
    - ko-fi-button

Config

Mandatory

  • id - Your Ko-fi ID. Can be found on your Ko-fi profile.

Optional

  • type - The type of button. Valid values are "widget" or "image". Default: widget
  • color - The color of the button.
    • If type == 'widget': In hex format. Default: #29abe0
    • If type == 'image': Either "blue", "bluegray", "red", "green" or "black". Default: bluegray
  • text - The text on the Ko-fi button.
    • If type == 'widget': Default: "Support Me on Ko-fi"
    • If type == 'image': Whatever text they have in the image.

For example:

plugins:
    - search
    - ko-fi-button:
        id: "my_id"
        text: "My cool text"
        color: "#547884"

Note: Some MkDocs theme CSS conflicts with the widget styling. If that is the case and you cannot or will not update the CSS, the type config is useful. Set that to "image" and it should render properly. There will be no wiggly coffe mug though.

Advanced config

In case the Ko-fi javascript is changed on the server side it is possible to configure the path and function calls. This will make it possible to still be able to get a working Ko-fi button widget until this plugin has been updated.

  • javascript_path - The relative path to the javascript from https://ko-fi.com/. Default: "widgets/widget_2.js"
  • javascript_f1 - The init function. Default: "kofiwidget2.init"
  • javascript_f2 - The draw function. Default: "kofiwidget2.draw"

Note: These config options are only valid if type is set to "widget". They are ignored otherwise.

Metadata

Release files for mkdocs-ko-fi-button-plugin 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkdocs-ko-fi-button-plugin 0.0.3
File Size Uploaded Provenance Actions
mkdocs-ko-fi-button-plugin-0.0.3.tar.gz 3.5 kB Without provenance Details for mkdocs-ko-fi-button-plugin-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-ko-fi-button-plugin 0.0.3
File Interpreter ABI Platform Actions
mkdocs_ko_fi_button_plugin-0.0.3-py3-none-any.whl Python 3 none any Details for mkdocs_ko_fi_button_plugin-0.0.3-py3-none-any.whl

Total release size: 8.6 kB

Release files / mkdocs-ko-fi-button-plugin-0.0.3.tar.gz

Download URL mkdocs-ko-fi-button-plugin-0.0.3.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e0fe0fbda4b7d546cd2af1f6590bd17ad688c2feb8e00a300a3a9c6ae194baa9
BLAKE2b-256 checksum
How to use checksums
656dc5109d943344309b23f7f6ba70b4c481c5cf49d163d0765ea67f78c677f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

Release files / mkdocs_ko_fi_button_plugin-0.0.3-py3-none-any.whl

Download URL mkdocs_ko_fi_button_plugin-0.0.3-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2641fe61aa0b36abc56ef1cbee9dc05ef197a6d77cd009ea62bebcccacc42a31
BLAKE2b-256 checksum
How to use checksums
86d2b3dc446bb28ceeba302028eb60bfe3c17aa903665a63c25217365440fd2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

Security for mkdocs-ko-fi-button-plugin 0.0.3

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page