Spress plugin to enable the Twig codeblock
function from ramsey/twig-codeblock.
Update your composer.json
to use GhislainPhu/Pygments.php instead of kzykhys/Pygments.php:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GhislainPhu/Pygments.php"
}
],
"require": {
"kzykhys/pygments": "dev-symfony-process-3 as 1.0-dev"
}
}
Run:
composer require ghislainphu/spress-codeblock
Please refer to upstream's README.md for more informations.
-
<
and>
are converted to<
and>
in markdown filesThis issue exists because the markdown converter runs before Twig.
Solution: Wrap your code inside of a
div
tag:<div> {% codeblock lang:php %} <?php echo 'Hello World!'; {% endcodeblock %} </div>
This project is licensed under the MIT License.
See LICENSE.md for more informations.