Skip to content

TwigExpress v2

Compare
Choose a tag to compare
@fvsch fvsch released this 29 May 11:49
· 14 commits to master since this release

BREAKING CHANGES:

  • Dropped support Apache when serving in a subfolder (e.g. http://localhost/my-twigexpress-prototype/); use VirtualHosts, or run TwigExpress from the command line.
  • Removed the _base global variable; if you need it, redeclare it in the global_vars config in twigexpress.json.
  • Removed the _get, _post and _cookie global variables; use the param() function instead.
  • The autoescape and strict_variables config keys have been moved inside a twig_options object; see doc/config.md for details.
  • Removed the second parameter for the files() and folders() functions.

New features:

  • Automatic Markdown previews for files ending in .md.
  • Config: allow_only - whitelist of file patterns to serve.
  • Config: debug_mode - disable folder listings, source views, debug pages.
  • Twig: param() function for getting GET, POST and cookie values.
  • Twig: create pages using the TwigExpress design (with automatic breadcrumbs), with {% extends twigexpress_layout() %}.