A kirbytext extension to inline svg images for Kirby.
If you are using the Kirby CLI you can install this plugin by running the following command in your shell from the root folder of your Kirby installation:
kirby plugin:install Thiousi/kirby-svg-kirbytag
Download this archive, extract it and rename it to svg-kirbytag
. Copy the folder to your site/plugins
folder.
If you know your way around git, you can download this as a submodule:
$ git submodule add https://github.com/Thiousi/kirby-svg-kirbytag site/plugins/svg-kirbytag
This kirbytag uses a stripped down version of the image tag as its base. Therefore, it works in a similar fashion but can't accept as many options. Here is the full list:
kirbytext::$tags['svg'] = array(
'attr' => array(
'class',
'caption',
'link',
'linkclass',
'title',
'target',
'rel',
),
Class added to the figure wrapping the svg tag. The figure appears if a caption is set or if the otion kirbytext.image.figure
is set to true in the configuration fo the site.
Adds a figcaption tag inside the figure containing the svg
Constructs a link that wraps the svg:
<a href="link" class="linkclass" title="title" target="target" rel="rel">
This plugin was created as part of writing up a tutorial on macotuts: https://macotuts.com/tuto/advanced/creating-svg-kirbytag
MIT
- Initial release