Skip to content

Instantly share code, notes, and snippets.

@zachleat
Created June 24, 2022 15:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Add your own Handlebars partial directlyto Eleventy
// 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