eleventy-upgrade-help
A plugin to help you upgrade your Eleventy project to a new major version. The major version of this plugin will always match the major version of Eleventy that you’re upgrading to.
Usage
Install from npm:
npm install @11ty/eleventy-upgrade-help
Add to your configuration file (probably .eleventy.js
):
const UpgradeHelper = require("@11ty/eleventy-upgrade-help");
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(UpgradeHelper);
};
After your upgrade is complete and you’ll removed all of the violations/warnings from your output, delete the plugin from your package.json
and .eleventy.js
configuration file.
Features
slug
to slugify
Filter
Swap from Issue 278. Useful when you want to swap your existing use of the slug
filter to the new slugify
filter and want to compare any URLs that may have changed. Read more about the slug
to slugify
transition on the Eleventy docs.
Data Deep Merge
Issue 1753. Warns if you do not use eleventyConfig.setDataDeepMerge
in your configuration file that the default value has changed.
Liquid Options
- Warns if you use
strict_filters
instead ofstrictFilters
. - Warns if you don’t have
strict_filters
orstrictFilters
that the new default istrue
. - Warns if you don’t have
dynamicPartials
, the new default istrue
.
.gitignore
Non-root Input directory Issue 364. If your input directory is not .
and you have a .gitignore
file inside (e.g. src/.gitignore
), this file is no longer supported.
✅ {ROOT}/.gitignore
🚫 {INPUT_DIR}/.gitignore
(removed in 1.0)✅ {ROOT}/.eleventyignore
✅ {INPUT_DIR}/.eleventyignore
Feature Opt-out
const UpgradeHelper = require("@11ty/eleventy-upgrade-help");
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(UpgradeHelper, {
slugToSlugify: false,
dataDeepMerge: false,
liquidOptions: false,
inputDirGitignore: false,
});
};