eleventyNavigation | ||||||
---|---|---|---|---|---|---|
|
{% tableofcontents %}
An Eleventy linter plugin to check for inclusive language in markdown files. Inspired by CSS Tricks’ Words to Avoid in Educational Writing. No browser/client JavaScript here—everything is this plugin is done at build-time.
<style> .demo-linter-first { color: yellow; } </style>{% callout "demo" %}
Inclusive Language Linter (./docs/quicktips/concatenate.md):
be modified, of course, to capture multiple
Of course, Eleventy has no desire to re
This is just a super simple example if you
build pipeline. That’s an easy way to concatenate
{% endcallout %}
Available on npm.
npm install @11ty/eleventy-plugin-inclusive-language
Open up your Eleventy config file (probably .eleventy.js
) and use addPlugin
:
{% codetitle ".eleventy.js" %}
const inclusiveLangPlugin = require("@11ty/eleventy-plugin-inclusive-language");
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(inclusiveLangPlugin);
};
{% callout "info", "md" %}You’re only allowed one module.exports
in your configuration file, so make sure you only copy the require
and the addPlugin
lines above!{% endcallout %}
Optionally pass in an options object as the second argument to addPlugin
to further customize this plugin.
const inclusiveLangPlugin = require("@11ty/eleventy-plugin-inclusive-language");
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(inclusiveLangPlugin, {
templateFormats: ["md"], // default, add more file extensions here
// accepts an array or a comma-delimited string
words:
"simply,obviously,basically,of course,clearly,just,everyone knows,however,easy",
});
};