From 97c4675317caa88d92a68426ea3ae3c71bbc599f Mon Sep 17 00:00:00 2001 From: Zach Leatherman Date: Tue, 24 Jan 2023 10:25:29 -0600 Subject: [PATCH] Try out the netlify lighthouse plugin --- netlify.toml | 13 +++++++++++++ package.json | 1 + 2 files changed, 14 insertions(+) diff --git a/netlify.toml b/netlify.toml index 182a663..29a66a8 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,3 +1,16 @@ [build] publish = "_site" command = "npm run build" + +[[plugins]] + package = "@netlify/plugin-lighthouse" + + # optional, fails build when a category is below a threshold + [plugins.inputs.thresholds] + performance = 1.0 + accessibility = 1.0 + best-practices = 1.0 + seo = 1.0 + + [plugins.inputs] + output_path = "reports/lighthouse/index.html" diff --git a/package.json b/package.json index 437ec71..2e3b7ef 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "@11ty/eleventy-navigation": "^0.3.5", "@11ty/eleventy-plugin-rss": "^1.2.0", "@11ty/eleventy-plugin-syntaxhighlight": "^4.2.0", + "@netlify/plugin-lighthouse": "^4.0.6", "luxon": "^3.2.1", "markdown-it-anchor": "^8.6.6" }