11ty

Eleventy Documentation

This is an older version of Eleventy. Full release history. Go to the newest Eleventy docs. You could try /docs/languages/mustache/ although it may not exist.

Documentation Pages

Mustache

Template Languages:

Eleventy Short NameFile ExtensionNPM Package
mustache.mustachemustache.js

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

Mustache Options #

Optional: Set your own Library instance #

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 #

FeatureSyntax
✅ Partials{{> user}} looks for _includes/user.mustache (does not process front matter)