Add your own Handlebars partial directlyto Eleventy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// via https://www.11ty.dev/docs/languages/handlebars/#optional-set-your-own-library-instance | |
module.exports = function(eleventyConfig) { | |
let handlebars = require("handlebars"); | |
// see https://handlebarsjs.com/guide/partials.html#basic-partials | |
handlebars.registerPartial("name", "Handlebars syntax"); | |
eleventyConfig.setLibrary("hbs", handlebars); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment