Using a stock install with Antimatter.
The page in question:
\```
title: Test
process:
markdown: true
twig: true
\```
This is a test page.
{{ test }}
Here is another line.
[section name="test"]
This line is in a shortcode.
[/section]
In antimatter.php:
<?php
namespace Grav\Theme;
use Grav\Common\Theme;
class Antimatter extends Theme
{
public static function getSubscribedEvents()
{
return [
'onTwigSiteVariables' => ['onTwigSiteVariables', 0]
];
}
public function onTwigSiteVariables()
{
$this->grav['twig']->twig_vars['test'] = 'Hello World!';
}
}
When I add the shortcode, neither the shortcode nor the Twig variable gets processed.
It seems like either Twig or shortcodes can be processed, but not both.
Am I missing something?