Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.02 KB

File metadata and controls

38 lines (27 loc) · 1.02 KB

@11ty/eleventy-plugin-handlebars

Adds support for .hbs (Handlebars) files in Eleventy v3.0 and newer. Support for hbs was moved out of core as part of Project Slipstream.

Re-uses Universal Filters, Universal Shortcodes, and Universal Paired Shortcodes.

Installation

npm install @11ty/eleventy-plugin-handlebars

Add to your configuration file (ESM version shown):

import handlebarsPlugin from "@11ty/eleventy-plugin-handlebars";

export default function (eleventyConfig) {
	eleventyConfig.addPlugin(handlebarsPlugin);
}

Use more options:

import handlebars from "handlebars";
import handlebarsPlugin from "@11ty/eleventy-plugin-handlebars";

export default function (eleventyConfig) {
	eleventyConfig.addPlugin(handlebarsPlugin, {
		// Override the `ejs` library instance
		eleventyLibraryOverride: handlebars,
	});
}