Skip to the content.

Installation

Install this library using composer

composer require geshi-twig-extension

Register the extension in your Twig environment

$twig->addExtension(new \Twig\Extension\GeshiExtension());

Twig Token Parser

The Twig token parser provides the geshi tag :

$twig->addTokenParser(new \Twig\TokenParser\GeshiTokenParser());