Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Releases: fvsch/kirby-twig

3.0.3 – Lighter Composer archive

14 Sep 18:20
Compare
Choose a tag to compare

Remove most doc files (except the LICENSE) on the Composer branch, so that Composer only downloads what is useful.

3.0.2 – Windows compatibility fix

27 Aug 07:58
274a8ca
Compare
Choose a tag to compare
  • #29 Fix loading some templates on Windows

3.0.1 – Fixes for plugins

29 Sep 16:34
Compare
Choose a tag to compare

Fixes:

  • #25 Can't register namespaces, functions & filters in plugins
  • #26 Somehow allow adding safe functions

3.0.0 – twig helper & more

19 Jan 09:32
Compare
Choose a tag to compare

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\Plugin class which will act as a stable API, while other implementation details may change.
  • Removed the twig.env.classes option and new() Twig function.
  • Twig’s template cache is now disabled by default (enable with c::set('twig.cache', true);).
  • Error reporting: the twig.error config key is now ignored. Instead, the site’s main error page (whose URI is error by default) will be used in some specific situations. See doc/errors.md for details.

Deprecated (still working)

  • twig.env.functions in favor of twig.function.myFunction;
  • twig.env.filters in favor of twig.filter.myFilter;
  • twig.env.namespace.xyz in favor of twig.namespace.xyz.

Note on branches and tags

  1. develop is now the development branch, with new features and potentially breaking changes.
  2. composer is the stable release that can be installed with Composer; Git tags starting from v3 will all point to this branch.
  3. master is the stable release that can be installed by downloading a zip file or with Kirby’s CLI.

3.0.0 – beta

17 Jan 12:24
Compare
Choose a tag to compare
3.0.0 – beta Pre-release
Pre-release

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

06 Dec 09:04
Compare
Choose a tag to compare
  • 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

05 Oct 07:29
Compare
Choose a tag to compare
v2.1.1

Fix #12 missing Tpl::$data in snippets

2.1.0 – Now with Twig namespaces

03 Oct 12:27
Compare
Choose a tag to compare
  • Add default Twig namespaces for templates, snippets, assets and plugins folders, and provide config to define other namespaces.
  • The c() function was renamed to c__get()
  • Twig’s PHP cache is now enabled by default

2.0.2 – Re-enable composer install

02 Sep 14:35
Compare
Choose a tag to compare

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

27 Jul 18:19
Compare
Choose a tag to compare

Warning: error page was not showing in 2.0.0. Fixed in this release.