picocms / Pico

Pico is a stupidly simple, blazing fast, flat file CMS.
http://picocms.org/
MIT License
3.83k stars 617 forks source link

config.yml , twig_config: and cache: false #427

Closed omniperspective closed 6 years ago

omniperspective commented 6 years ago

I'm moving my site from from pico CMS 1.0.6 to 2.0-beta3, all goes well, but I can't find the information on the following:

config.yml

twig_config: cache: false # Enable Twig template caching by specifying a path to a writable directory

My question is, WHERE do I define/specify my cache directory, as it seems that the variable is a boolean.

PhrozenByte commented 6 years ago

twig_config is passed through to the Twig_Environment class, allowing you to set arbitrary Twig environment options. See https://twig.symfony.com/doc/1.x/api.html#environment-options for a complete list of options.

To answer your question: The twig_config.cache option is either false or a path to the desired cache directory. Try

twig_config:
    cache: /path/to/twig/cache
omniperspective commented 6 years ago

After a big facepalm ;-), english is not my native language, but now reading is the answer was already documented in the comments.

Thanks for the answer, especially for the link to Twig_Environment class.

Item can closed.