- Stable
3.0.0
Toggle Menu
Eleventy
1.93s
Next.js
70.65s
HAML
Template Languages:
Contents
Eleventy Short Name | File Extension | npm Package |
---|---|---|
haml |
.haml |
haml.js |
You can override a .haml
file’s template engine. Read more at Changing a Template’s Rendering Engine.
Installation
The haml
templating language was moved out of Eleventy core in v3 and now requires a plugin installation.
npm install @11ty/eleventy-plugin-haml
Add to your configuration file:
eleventy.config.js
import hamlPlugin from "@11ty/eleventy-plugin-haml";
export default function (eleventyConfig) {
eleventyConfig.addPlugin(hamlPlugin);
}
const hamlPlugin = require("@11ty/eleventy-plugin-haml");
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(hamlPlugin);
}
Use more options:
eleventy.config.js
import haml from "hamljs";
import hamlPlugin from "@11ty/eleventy-plugin-haml";
export default function (eleventyConfig) {
eleventyConfig.addPlugin(hamlPlugin, {
// Override the `haml` library instance
eleventyLibraryOverride: haml,
});
}
const haml = require("hamljs");
const hamlPlugin = require("@11ty/eleventy-plugin-haml");
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(hamlPlugin, {
// Override the `haml` library instance
eleventyLibraryOverride: haml,
});
}
Supported Features
Feature | Syntax |
---|---|
🚫 Filters | Not yet supported :filterName some text Read more about Filters. |
🚫 Universal Filters | Not yet supported :filterName some text Read more about Filters. |