Skip to content

Instantly share code, notes, and snippets.

@allmarkedup
Last active February 19, 2016 21:34
Show Gist options
  • Select an option

  • Save allmarkedup/4f9e42592157894ec7d4 to your computer and use it in GitHub Desktop.

Select an option

Save allmarkedup/4f9e42592157894ec7d4 to your computer and use it in GitHub Desktop.
Register handlebars helpers with Fractal
'use strict';
const fractal = require('@frctl/fractal');
const markdown = require('helper-markdown');
// other fractal config here...
fractal.engine('handlebars', '@frctl/handlebars-adapter', {
helpers: {
markdown: markdown()
}
});
@allmarkedup

Copy link
Copy Markdown
Author

You can register as main helpers as you like in the 'helpers' object - the name you give them there will be the name that they are referenced by in your templates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment