Skip to content

Commit eaab587

Browse files
committed
fix: update cspell config for new files and exclude 404 from lychee
Add cspell override for src/*.njk root files (bilingual context), add missing words (Dxsk, Applebot, Bytespider, llms) to dictionary, and add markdown-link-urls pattern to ignore URL slugs in links. Add .lychee.toml to exclude the 404 page from external link checks since it naturally returns a 404 status code.
1 parent f853888 commit eaab587

File tree

5 files changed

+25
-4
lines changed

5 files changed

+25
-4
lines changed

.github/workflows/links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ jobs:
2222

2323
- uses: lycheeverse/lychee-action@v2
2424
with:
25-
args: --no-progress --root-dir _site '_site/**/*.html'
25+
args: --no-progress --config .lychee.toml --root-dir _site '_site/**/*.html'
2626
fail: true

.lychee.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Lychee link checker configuration
2+
# https://lychee.cli.rs/configuration/
3+
4+
# Exclude URLs that are expected to return non-200 status codes
5+
exclude = [
6+
# The 404 page references its own URL which naturally returns 404
7+
"https://git.learning.dxscloud.fr/404.html"
8+
]

cspell-words.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,12 @@ hostable
162162
unintegrated
163163
gamified
164164
dxscloud
165+
Dxsk
166+
167+
# AI/SEO related terms
168+
llms
169+
Applebot
170+
Bytespider
165171

166172
# Structure / Paths
167173
quetes

cspell.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
"filename": "src/_includes/**",
4949
"language": "en,fr-fr",
5050
"dictionaries": ["project-words"]
51+
},
52+
{
53+
"filename": "src/*.njk",
54+
"language": "en,fr-fr",
55+
"dictionaries": ["project-words"]
5156
}
5257
],
5358
"patterns": [
@@ -58,7 +63,8 @@
5863
{ "name": "css-classes", "pattern": "class=\"[^\"]*\"" },
5964
{ "name": "code-blocks", "pattern": "<code>[^<]*</code>" },
6065
{ "name": "pre-blocks", "pattern": "<pre[^>]*>[\\s\\S]*?</pre>" },
61-
{ "name": "html-entities", "pattern": "&\\w+;" }
66+
{ "name": "html-entities", "pattern": "&\\w+;" },
67+
{ "name": "markdown-link-urls", "pattern": "\\]\\([^)]+\\)" }
6268
],
6369
"ignoreRegExpList": [
6470
"html-tags",
@@ -68,6 +74,7 @@
6874
"css-classes",
6975
"code-blocks",
7076
"pre-blocks",
71-
"html-entities"
77+
"html-entities",
78+
"markdown-link-urls"
7279
]
7380
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"check": "npm run check:i18n && npm run build && npm run check:links && npm run check:links:external && npm run check:a11y",
1212
"check:i18n": "node scripts/pipeline/check-i18n-parity.js",
1313
"check:links": "node scripts/pipeline/check-internal-links.js",
14-
"check:links:external": "lychee --no-progress --root-dir _site '_site/**/*.html'",
14+
"check:links:external": "lychee --no-progress --config .lychee.toml --root-dir _site '_site/**/*.html'",
1515
"check:a11y": "node scripts/pipeline/check-accessibility.js",
1616
"prepare": "husky"
1717
},

0 commit comments

Comments
 (0)