From 82f7c51a6865ea07d82339d15e43129f7f03f006 Mon Sep 17 00:00:00 2001 From: Tim Kroeger Date: Thu, 24 Nov 2022 17:30:17 +0100 Subject: [PATCH 1/3] add inclusive language linter https://www.11ty.dev/docs/plugins/inclusive-language/ --- .eleventy.js | 3 +++ package-lock.json | 27 +++++++++++++++++++++++++-- package.json | 1 + 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index 62bcbb4..97c7793 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -36,6 +36,8 @@ const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight'); const {slugifyString} = require('./config/utils'); const {escape} = require('lodash'); const pluginRss = require('@11ty/eleventy-plugin-rss'); +const inclusiveLangPlugin = require("@11ty/eleventy-plugin-inclusive-language"); + module.exports = eleventyConfig => { // Tell 11ty to use the .eleventyignore and ignore our .gitignore file @@ -85,6 +87,7 @@ module.exports = eleventyConfig => { eleventyConfig.addPlugin(syntaxHighlight); eleventyConfig.setLibrary('md', markdownLib); eleventyConfig.addPlugin(pluginRss); + eleventyConfig.addPlugin(inclusiveLangPlugin); // --------------------- Passthrough File Copy ----------------------- diff --git a/package-lock.json b/package-lock.json index ee81ad8..be2f5e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "eleventy-excellent", - "version": "1.0.3", + "version": "1.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "eleventy-excellent", - "version": "1.0.3", + "version": "1.1.1", "license": "ISC", "dependencies": { "@11ty/eleventy": "^2.0.0-canary.16", @@ -16,6 +16,7 @@ "tailwindcss": "^3.0.23" }, "devDependencies": { + "@11ty/eleventy-plugin-inclusive-language": "^1.0.3", "@11ty/eleventy-plugin-rss": "^1.2.0", "@netlify/plugin-a11y": "^1.0.0-beta.1", "@toycode/markdown-it-class": "^1.2.4", @@ -179,6 +180,19 @@ "url": "https://opencollective.com/11ty" } }, + "node_modules/@11ty/eleventy-plugin-inclusive-language": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@11ty/eleventy-plugin-inclusive-language/-/eleventy-plugin-inclusive-language-1.0.3.tgz", + "integrity": "sha512-hQ+kD04aPphK2VYZZ3zqpOSwtvoFxLxxmi+5SVTvlqeQlWQ0SYA57Dg3W0Nj2LdshlYf6gwdGQq34O/MlyolYw==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/11ty" + } + }, "node_modules/@11ty/eleventy-plugin-rss": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@11ty/eleventy-plugin-rss/-/eleventy-plugin-rss-1.2.0.tgz", @@ -7330,6 +7344,15 @@ "sharp": "^0.30.3" } }, + "@11ty/eleventy-plugin-inclusive-language": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@11ty/eleventy-plugin-inclusive-language/-/eleventy-plugin-inclusive-language-1.0.3.tgz", + "integrity": "sha512-hQ+kD04aPphK2VYZZ3zqpOSwtvoFxLxxmi+5SVTvlqeQlWQ0SYA57Dg3W0Nj2LdshlYf6gwdGQq34O/MlyolYw==", + "dev": true, + "requires": { + "chalk": "^4.1.0" + } + }, "@11ty/eleventy-plugin-rss": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@11ty/eleventy-plugin-rss/-/eleventy-plugin-rss-1.2.0.tgz", diff --git a/package.json b/package.json index 0276950..ba96aed 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "tailwindcss": "^3.0.23" }, "devDependencies": { + "@11ty/eleventy-plugin-inclusive-language": "^1.0.3", "@11ty/eleventy-plugin-rss": "^1.2.0", "@netlify/plugin-a11y": "^1.0.0-beta.1", "@toycode/markdown-it-class": "^1.2.4", From ca480465e396715366c9679829c017b3f9c50573 Mon Sep 17 00:00:00 2001 From: Tim Kroeger Date: Thu, 24 Nov 2022 17:31:03 +0100 Subject: [PATCH 2/3] fix some language to be more inclusive --- src/posts/2022-08-28-post-with301-redirects.md | 4 ++-- src/posts/2022-11-02-markdown.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/posts/2022-08-28-post-with301-redirects.md b/src/posts/2022-08-28-post-with301-redirects.md index 9b6a36b..a4020bd 100644 --- a/src/posts/2022-08-28-post-with301-redirects.md +++ b/src/posts/2022-08-28-post-with301-redirects.md @@ -1,6 +1,6 @@ --- title: 'Post with 301 redirects' -description: 'A 301 is used when a page has permanently changed location. Informing about this change is indispensable if you want to keep a positioning. Aleksandr Hovhannisyan came up with an easy solution for Eleventy and Netlify.' +description: 'A 301 is used when a page has permanently changed location. Informing about this change is indispensable if you want to keep a positioning. Aleksandr Hovhannisyan came up with an elegant solution for Eleventy and Netlify.' date: 2022-08-28 --- @@ -9,7 +9,7 @@ URLs usually change over time, as you use another CMS or optimizye your file str A 301 is used when a page has permanently changed location. Informing about this change is indispensable if you want to keep your incoming links working, be it from organic Google search or other pages that have linked to your content. -Aleksandr Hovhannisyan came up with an [easy solution for Eleventy and Netlify](https://www.aleksandrhovhannisyan.com/blog/eleventy-netlify-redirects/). To directly cover several possible previous routes it is created as an array. You can find the loop in `_redirects.njk`. +Aleksandr Hovhannisyan came up with an [elegant solution for Eleventy and Netlify](https://www.aleksandrhovhannisyan.com/blog/eleventy-netlify-redirects/). To directly cover several possible previous routes it is created as an array. You can find the loop in `_redirects.njk`. ## Usage diff --git a/src/posts/2022-11-02-markdown.md b/src/posts/2022-11-02-markdown.md index b2e041e..56f8ccf 100644 --- a/src/posts/2022-11-02-markdown.md +++ b/src/posts/2022-11-02-markdown.md @@ -56,7 +56,7 @@ _This is italic text_ - Create a list by starting a line with `+`, `-`, or `*` - Sub-lists are made by indenting 2 spaces: -- Very easy! +- Very simple! ### Ordered lists From 9060e4c8044b7ab9a13d56459c009dff897b0596 Mon Sep 17 00:00:00 2001 From: Tim Kroeger Date: Thu, 24 Nov 2022 18:03:19 +0100 Subject: [PATCH 3/3] forgot to run install so package-lock.json was missing the updated version nr. --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index c064063..61531d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "eleventy-excellent", - "version": "1.1.1", + "version": "1.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "eleventy-excellent", - "version": "1.1.1", + "version": "1.1.2", "license": "ISC", "dependencies": { "@11ty/eleventy": "^2.0.0-canary.16",