Skip to content

A collection of custom shortcodes tailored for Hugo static site generator, designed to seamlessly integrate Ko-fi buttons and widgets into any blog post

License

Notifications You must be signed in to change notification settings

tgagor/hugo-shortcode-kofi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hugo shortcodes for Ko-fi

build GitHub GitHub Release Date

This is a set of shortcodes to allow easy integration with Ko-fi.

Live demo on my blog.

Installation

  1. Clone hugo-shortcode-kofi repo to your project:
  • as submodule (recommended)

    cd your-site-location
    
    git submodule add --depth=1 https://github.com/tgagor/hugo-shortcode-kofi.git themes/hugo-shortcode-kofi

    You might need to initialize any uninitialized submodules in the repository and then recursively update all submodules to their latest versions to make it fully available:

    git submodule update --init --recursive
  • or by just cloning

    cd your-site-location
    
    git clone --depth=1 https://github.com/tgagor/hugo-shortcode-kofi.git themes/hugo-shortcode-kofi
  1. Update blog config:
theme:
  - YourThemeOfChoice
  - hugo-shortcode-kofi

Original theme should be first, followed up by extension.

If you're unable to get it working, check exampleSite directory.

List of shortcodes

Animated button
{{< kofi/button >}} or
{{< kofi/button color="#13C3FF" >}}
{{< kofi/button color="#FF5E5B" >}}
{{< kofi/button color="#434b57" >}}
Image style 1
{{< kofi/image1 >}} or
{{< kofi/image1 style="blue" >}}
{{< kofi/image1 style="grey" >}}
{{< kofi/image1 style="red" >}}
{{< kofi/image1 style="green" >}}
{{< kofi/image1 style="dark" >}}
Image style 2
{{< kofi/image2 >}} or
{{< kofi/image2 style="blue" >}}
{{< kofi/image2 style="red" >}}
{{< kofi/image2 style="stroke" >}}
{{< kofi/image2 style="dark" >}}

Logotypes

Logos
{{< kofi/logo >}} or
{{< kofi/logo style="logo" >}}
{{< kofi/logo style="mug" >}}
{{< kofi/logo style="pixel" >}}

Badges

Badges
{{< kofi/badge >}} or
{{< kofi/badge style=white >}}
{{< kofi/badge style=dark >}}
{{< kofi/badge style=bg-white >}}
{{< kofi/badge style=bg-dark >}}

Dynamic widgets

Widgets
{{< kofi/floating-button >}}
{{< kofi/donation-panel >}}

Custom images

Custom images
{{< kofi/custom height=200 url="https://media.giphy.com/media/kgKFcQk6oa1WIdHNSl/giphy.gif" >}}

About

A collection of custom shortcodes tailored for Hugo static site generator, designed to seamlessly integrate Ko-fi buttons and widgets into any blog post

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages