Site Variables

Anything you add to the array in config.php will be made available in all of your templates, as a property of the $page object.

For example, if your config.php looks like this:


return [
    'contact_email' => '',
]; can use that variable in any of your templates like so:


    <p>Contact us at {{ $page->contact_email }}</p>

If you prefer, site variables can also be accessed as arrays:

<p>Contact us at {{ $page['contact_email'] }}</p>

Jigsaw also supports environment-specific site variables, which you can learn more about here.