11ty

Eleventy Documentation

⚠️ This documentation is for an older version. Go to the newest Eleventy docs or check out the full release history.

Documentation Pages

Mustache

Template Languages:

Eleventy Short Name File Extension NPM Package
mustache .mustache mustache.js

You can override a .mustache file’s template engine. Read more at Changing a Template’s Rendering Engine.

Set your own Library instance #

New in Eleventy v0.3.0: As an escape mechanism for advanced usage, pass in your own instance of the Mustache library using the Configuration API.

module.exports = function(eleventyConfig) {
let mustache = require("mustache");
eleventyConfig.setLibrary("mustache", mustache);
};

Supported Features #

Feature Syntax
✅ Partials {{> user}} looks for _includes/user.mustache