0.0.8 • Published 6 years ago

mangony-hbs-helper-wrap-with v0.0.8

Weekly downloads
79
License
MIT
Repository
github
Last release
6 years ago

This helper gives you the possibility to construct a general template snippet ({{#wrapWith}}) which can be used as enclosing markup in your pages and/or partials. This helper is very useful when you have to build complex grid systems with repetitive code.

Installation

Install mangony-hbs-helper-wrap-with with

npm install mangony-hbs-helper-wrap-with --save-dev

Usage

Helper is generated by passing in an instance of Handlebars.

helper.register(handlebars) : Object

  • handlebars Handlebars - An instance of Handlebars.
var handlebars = require('handlebars');
var mgyHelperWrapWith = require('mangony-hbs-helper-wrap-with');

helper.register(handlebars);

Helper

wrapWith partial

<section class="section{{#if props.classes}} {{props.classes}}{{/if}}">
   {{{yield}}}
</section>

{{{yield}}} will be replaced with the provided content.

Usage of wrapWith

{{#wrapWith "section" classes="is-left"}}
   my custom content or 
   {{> my-partial}}
{{/wrapWith}}

Mangony

Mangony is yet another static site generator - fast, simple and powerful: https://github.com/Sebastian-Fitzner/mangony

License

see LICENSE.md.

0.0.8

6 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago