Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 957 Bytes

File metadata and controls

36 lines (26 loc) · 957 Bytes

@11ty/eleventy-plugin-mustache

Adds support for .mustache (Embedded JavaScript templates) files in Eleventy v3.0 and newer. Support for mustache was moved out of core as part of Project Slipstream.

Installation

npm install @11ty/eleventy-plugin-mustache

Add to your configuration file (ESM version shown):

import mustachePlugin from "@11ty/eleventy-plugin-mustache";

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

Use more options:

import mustache from "mustache";
import mustachePlugin from "@11ty/eleventy-plugin-mustache";

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