PHPackages                             omz13/kirby3-badges - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. omz13/kirby3-badges

AbandonedArchivedKirby-plugin

omz13/kirby3-badges
===================

kirby3 plugin to provide a tag (badge) to make badges

0.2.0(7y ago)122[2 issues](https://github.com/omz13/kirby3-badges/issues)MITPHPPHP &gt;=7.1

Since Sep 12Pushed 7y ago1 watchersCompare

[ Source](https://github.com/omz13/kirby3-badges)[ Packagist](https://packagist.org/packages/omz13/kirby3-badges)[ RSS](/packages/omz13-kirby3-badges/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (11)Versions (3)Used By (0)

Kirby3 badges
=============

[](#kirby3-badges)

[![License](https://camo.githubusercontent.com/850eae1099d2b05f53383473d7cd51f9bc1ab09b7d0d9e5122f1dd930efdcc6d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6173686170652f6170697374617475732e737667)](https://camo.githubusercontent.com/850eae1099d2b05f53383473d7cd51f9bc1ab09b7d0d9e5122f1dd930efdcc6d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6173686170652f6170697374617475732e737667) [![Kirby Version](https://camo.githubusercontent.com/f06d505d5d4d514f4b7e492613c648caa608f102ca9cdace291f8e13cf8c5125/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4b697262792d332d626c61636b2e737667)](https://camo.githubusercontent.com/f06d505d5d4d514f4b7e492613c648caa608f102ca9cdace291f8e13cf8c5125/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4b697262792d332d626c61636b2e737667) [![Issues](https://camo.githubusercontent.com/06779b80f9df8428281de400b5fab5281ae63d79d3373eeb0569d5768e429e8b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6f6d7a31332f6b69726279332d6261646765732e737667)](https://github.com/omz13/kirby3-badges/issues)

**Requirement:** Kirby 3

Coffee, Beer, etc.
------------------

[](#coffee-beer-etc)

This plugin is free. However, to show your support, especially if using it in a commercial project, you are welcome (greatly encouraged) to:

- [make a donation 🍻](https://www.paypal.me/omz13/10) or
- [buy me ☕☕](https://buymeacoff.ee/omz13) or
- [buy a Kirby license using this affiliate link](https://a.paddle.com/v2/click/1129/36191?link=1170)

Documentation
-------------

[](#documentation)

### Purpose

[](#purpose)

For a [Kirby3](https://getkirby.com)-powered site, this plugin (*omz13/badges*) provides a KirbyTag (called `badge`) that allows badges to be rendered in a page.

- This plugin is a convenience wrapper around [PHP Badges Library](https://github.com/badges/poser).
- No configuration is really necessary as it comes with sensible defaults.
- The render style can be specified in the configuration file and overridden on a per tag basis.
- The color for the value can be specified in the configuration file and overridden on a per tag basis.
- There are sensible defaults if you forget to provide the necessary key and/or value data in a tag.
- The badge is rendered locally, provided as a SVG image, and wrapped in a `` with an optional `class`.

#### Roadmap

[](#roadmap)

The non-binding list of further features and implementation notes are:

- Page-level function
- Put a joke or two into README
- Use the word *epistemological* in README to confuse everybody (except people who do or have done philosophy or art history).

### Installation

[](#installation)

Pick one of the following per your epistemological model:

- `composer require omz13/kirby3-badges`; the plugin will automagically appear in `site/plugins`.
- Download a zip of the latest release - [master.zip](https://github.com/omz13/kirby3-badges/archive/master.zip) - and copy the contents to your `site/plugins/kirby3-badges`.
- `git submodule add https://github.com/omz13/kirby3-badges.git site/plugins/kirby3-badges`.

For the record: installation by composer is cool; supporting installation by zip and submodule was an absolute pain, especially as I am an installation by composer person, so do feel guilted into getting me Coffee, Beer, etc., because this is for *your* benefit and *not mine* (and yes, I would have have preferred to spend my time somewhere warm and sunny instead of being hunched over a keyboard while the snow falls outside and the thermometer shows no inclination to get above 0C).

### Configuration

[](#configuration)

The following mechanisms can be used to modify the plugin's behavior.

#### via `config.php`

[](#via-configphp)

In your site's `site/config/config.php` the following entries prefixed with `omz13.badges.` can be used:

- `style` - optional - the name of the rendering style to apply.

    Possible values are:

    - `flat` (default if not specified)
    - `flat-square`
    - `plastic`
- `color` - optional - the name or RGBHEX value to be used for the badge's name.

    If not specified, `428F7E` is assumed.
- `class` - optional - the code for the badge will be wrapped in a `` with a *classname* specified here.

    If not specified, the `` wrapper has no class.

For example:

```
