Essential 11ty filters, pre/post-processors, and other toggleable features as a simple, configurable plugin.
Includes Base package and Reusable npm scripts for a better DX.
There are 5 ways to get started:
npm install @anyblades/eleventy-bladesThen addPlugin to your 11ty config:
import eleventyBladesPlugin from "@anyblades/eleventy-blades";
export default function (eleventyConfig) {
eleventyConfig.addPlugin(eleventyBladesPlugin);
}You can toggle features/filters like this:
eleventyConfig.addPlugin(eleventyBladesPlugin, {
mdAutoRawTags: false,
filters: { attr_set: false },
});Live example: https://github.com/anyblades/eleventy-blades/blob/main/packages/eleventy-blades-base/eleventy.config.js
npm install @anyblades/eleventy-blades-baseThen use baseConfig in your 11ty config:
import baseConfig from "@anyblades/eleventy-blades-base";
export default async function (eleventyConfig) {
await baseConfig(eleventyConfig);
}You can toggle features/filters like this:
await baseConfig(eleventyConfig, {
plugins: {
"@anyblades/eleventy-blades": {
mdAutoRawTags: false,
filters: { attr_set: false },
},
},
});Live examples:
- https://github.com/johnheenan/minform/blob/main/eleventy.config.js
- https://github.com/hostfurl/minformhf/blob/main/eleventy.config.js
npm install @anyblades/eleventy-blades-base
eleventy --config=./node_modules/@anyblades/eleventy-blades-base/eleventy.config.jsLive examples:
- https://github.com/anyblades/subtle/blob/main/.11ty/package.json
- https://github.com/anyblades/buildawesome-starters/blob/main/package.json
npm install @anyblades/eleventy-blades-base
ln -s ./node_modules/@anyblades/eleventy-blades-base/eleventy.config.js
eleventyEleventy Blades plugin is included out-of-the-box with:
- https://subtle.blades.ninja/ 11ty micro-starter
- https://github.com/anyblades/buildawesome-starters 11ty Tailwind CLI starter(s)