This plugin provides a shortcode (KirbyTag) for embedding CodePens in your text.
This plugin is free but if you use it in a commercial project please consider
Download the files and place them inside site/plugins/kirby-codepen
.
You can add the plugin as a Git submodule.
$ cd your/project/root
$ git submodule add https://github.com/texnixe/kirby3-codepen.git site/plugins/kirby-codepen
$ git submodule update --init --recursive
$ git commit -am "Add Kirby CodePen plugin"
Run these commands to update the plugin:
$ cd your/project/root
$ git submodule foreach git checkout master
$ git submodule foreach git pull
$ git commit -am "Update submodules"
$ git submodule update --init --recursive
composer require texnixe/kirby3-codepen
The CodePen Id is required.
(codepen: jwGBh)
You can set the following default options in your config.php
:
'texnixe.codepen.preview' => true;
'texnixe.codepen.height' => 300;
'texnixe.codepen.themeId' => 1
'texnixe.codepen.defaultTab' => 'js,result'
You can overwrite the config options in the KirbyTag, e.g.
(codepen: jwGBh height: 250)
In addition to the above settings, the following options are available:
user
: default ''title
: default ''
This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you encounter any problem, please create an issue.
License
It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.