I have seen many programmers mention Pug as a ‘templating language’, as if it were similar to Twig or Blade. Pug is actually an HTML preprocessor - much like LESS/SASS for CSS, and Coffeescript/Typescript to JS.
I have started to use Pug to write my templates and snippets, instead of HTML, but I’m finding the process cumbersome, as I have to compile the Pug files into HTML before Kirby is able to use them. There are, however, a few Pug compilers/parsers written in PHP - such as Phug. I was wondering, therefore, whether there is a way to add the Phug compiler as a plugin directly into Kirby - i.e., as a pre-processor to all templates and snippets, enabling me to save the “.pug” files directly into my ‘templates’ and ‘snippets’ directories.
I’ve had a quick look at the online docs, but cannot seem to find specific instructions… Can someone provide some guidance? Is this possible?..