From 6e8d09f2c545fc2bf255c019c6d6228dadd886d2 Mon Sep 17 00:00:00 2001 From: Sean Smith Date: Fri, 19 Jan 2024 19:12:03 -0600 Subject: [PATCH] chore: Check links with lychee Adds an npm script for running lychee against a locally running site. --- lychee.toml | 6 ++++++ package.json | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 lychee.toml diff --git a/lychee.toml b/lychee.toml new file mode 100644 index 00000000..379551cd --- /dev/null +++ b/lychee.toml @@ -0,0 +1,6 @@ +# Exclude google font links since the roots 404, but are still used for +# preconnecting. +exclude = [ + "https://fonts.gstatic.com/", + "https://fonts.googleapis.com/" +] diff --git a/package.json b/package.json index 44df8609..9cf213c9 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "format": "prettier --check .", "format:fix": "prettier --write .", "lint": "markdownlint-cli2 \"**/*.{md,mdx}\" \"!node_modules\" \"!_site\"", - "lint:fix": "markdownlint-cli2-fix \"**/*.{md,mdx}\" \"!node_modules\" \"!_site\"" + "lint:fix": "markdownlint-cli2-fix \"**/*.{md,mdx}\" \"!node_modules\" \"!_site\"", + "links": "lychee -v http://localhost:4000" }, "devDependencies": { "cspell": "^6.31.1",