Package stick is now solely a parser and template executor that aims to provide the same feature-set as the Twig language itself sans core extensions. To get a more Twig-like experience, including the expected auto-escaping, filters, functions, and tests, use github.com/tyler-sommer/stick/twig.
stick.New() now creates a completely bare executing environment.
twig.New() creates a more Twig-compatible environment with the expected filters and auto-escaping (and is under development)
It boils down to:
If you were using stick.New() before, switch to twig.New().
If you were using stick.NewEnv() before, use stick.New() instead.
Please open an issue if you run into any problems or have any feedback.
I moved the Twig-compatibility related extensions to the subpackage github.com/tyler-sommer/stick/twig.
This impacts a couple of things:
stick
is now solely a parser and template executor that aims to provide the same feature-set as the Twig language itself sans core extensions. To get a more Twig-like experience, including the expected auto-escaping, filters, functions, and tests, use github.com/tyler-sommer/stick/twig.stick.New()
now creates a completely bare executing environment.twig.New()
creates a more Twig-compatible environment with the expected filters and auto-escaping (and is under development)It boils down to:
stick.New()
before, switch totwig.New()
.stick.NewEnv()
before, usestick.New()
instead.Please open an issue if you run into any problems or have any feedback.