github maizzle/framework v3.2.0

latest releases: v4.8.4, v4.8.3, v4.8.2...
3 years ago

New features

Dynamic layouts

You can now use expressions in layout tag attribute values.

For example, you can dynamically set the Layout that a Template should extend:

<extends src="src/layouts/{{ page.env === 'production' ? 'production' : 'local' }}.html">
  <block name="template">
    ...
  </block>
</extends>

<block> names can also be dynamic:

<extends src="src/layouts/main.html">
  <block name="{{ page.env === 'production' ? 'template' : 'head' }}">
    ...
  </block>
</extends

Layout plugins

You can now apply PostHTML plugins to Layouts.

module.exports = {
  build: {
    layouts: {
      plugins: [], // see https://github.com/posthtml/posthtml-extend#plugins
    }
  }
}

By default, the posthtml-expressions plugin is used and it includes all Maizzle page variables and settings you have defined for it.


v3.1.6...v3.2.0

Don't miss a new framework release

NewReleases is sending notifications on new releases.