This repository was archived by the owner on Nov 14, 2023. It is now read-only.
Releases: fvsch/kirby-twig
Releases · fvsch/kirby-twig
3.0.3 – Lighter Composer archive
3.0.2 – Windows compatibility fix
- #29 Fix loading some templates on Windows
3.0.1 – Fixes for plugins
3.0.0 – twig helper & more
New features
- A new
twig()helper function allows rendering a template file or a template string from PHP. - Flexible configuration with
twig.function.*config keys that allow exposing any number of functions to Twig templates from config, plugins, etc. - Improved error handling.
- Much of the documentation has been rewritten.
BREAKING
- Namespace and class names (and sometimes methods) have changed; there is now a
Kirby\Twig\Pluginclass which will act as a stable API, while other implementation details may change. - Removed the
twig.env.classesoption andnew()Twig function. - Twig’s template cache is now disabled by default (enable with
c::set('twig.cache', true);). - Error reporting: the
twig.errorconfig key is now ignored. Instead, the site’s main error page (whose URI iserrorby default) will be used in some specific situations. Seedoc/errors.mdfor details.
Deprecated (still working)
twig.env.functionsin favor oftwig.function.myFunction;twig.env.filtersin favor oftwig.filter.myFilter;twig.env.namespace.xyzin favor oftwig.namespace.xyz.
Note on branches and tags
developis now the development branch, with new features and potentially breaking changes.composeris the stable release that can be installed with Composer; Git tags starting from v3 will all point to this branch.masteris the stable release that can be installed by downloading a zip file or with Kirby’s CLI.
3.0.0 – beta
If you’re arriving here from the Kirby Cosmos newsletter, note that Kirby Twig 3.0.0 stable was realeased.
Installation instructions:
https://github.com/fvsch/kirby-twig#installation
Release notes:
https://github.com/fvsch/kirby-twig/releases/tag/v3.0.0
2.1.2 – Updated Twig lib
- Updated Twig lib to 1.28.2.
- Added the
pattern()helper function (from the Kirby Patterns plugin) to the list of functions available by default.
2.1.1 – Fix snippet rendering
v2.1.1 Fix #12 missing Tpl::$data in snippets
2.1.0 – Now with Twig namespaces
- Add default Twig namespaces for templates, snippets, assets and plugins folders, and provide config to define other namespaces.
- The
c()function was renamed toc__get() - Twig’s PHP cache is now enabled by default
2.0.2 – Re-enable composer install
This re-enables installing with Composer, this time directly from Packagist, but it does not (yet?) replace the Twig library copy with a Composer-installed one.
2.0.1 – Fixed the error page
Warning: error page was not showing in 2.0.0. Fixed in this release.