Skip to content

Commit 6a17a21

Browse files
committed
linkx-checking
1 parent 77d0aa0 commit 6a17a21

3 files changed

Lines changed: 46 additions & 4 deletions

File tree

markdown-link-check.json

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,48 @@
11
{
2+
"ignorePatterns": [
3+
{
4+
"pattern": "^https?://"
5+
},
6+
{
7+
"pattern": "^mailto:"
8+
},
9+
{
10+
"pattern": "^/bugs?$"
11+
},
12+
{
13+
"pattern": "^\\.\\./\\.\\./src/"
14+
},
15+
{
16+
"pattern": "^#"
17+
},
18+
{
19+
"pattern": "torque(\\.md)?$"
20+
},
21+
{
22+
"pattern": "torque-builtins(\\.md)?$"
23+
},
24+
{
25+
"pattern": "csa-builtins(\\.md)?$"
26+
},
27+
{
28+
"pattern": "turbofan(\\.md)?$"
29+
},
30+
{
31+
"pattern": "ignition(\\.md)?$"
32+
},
33+
{
34+
"pattern": "hidden-classes(\\.md)?$"
35+
},
36+
{
37+
"pattern": "wasm-compilation-pipeline(\\.md)?$"
38+
},
39+
{
40+
"pattern": "sandbox(\\.md)?$"
41+
}
42+
],
243
"replacementPatterns": [
344
{
4-
"pattern": "^/((docs|blog|features)/[\\w-]+)(?:#.*)?$",
45+
"pattern": "^/((docs|blog|features)/[\\w/-]+)(?:#.*)?$",
546
"replacement": "{{BASEURL}}/src/$1.md"
647
},
748
{

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"private": true,
33
"scripts": {
4-
"lint": "markdownlint \"src/**/*.md\"",
4+
"lint": "markdownlint \"src/**/*.md\" && npm run lint:links",
5+
"lint:links": "markdown-link-check -q --config markdown-link-check.json src/docs/**/*.md",
56
"eleventy": "eleventy",
67
"html": "html-minifier-terser --config-file=.html-minifier.json --input-dir=dist --output-dir=dist --file-ext=html",
78
"css": "postcss src/_css/main.css --output dist/_css/main.css && postcss src/_css/feature-support.css --output dist/_css/feature-support.css",

sync-docs.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ function sh(cmdArray, options = {}) {
2929
}
3030
}
3131

32-
if (!REPO_PATH.startsWith('http') && !REPO_PATH.startsWith('git')) {
33-
console.error(`Error: ${REPO_PATH} is not a recognized Git URL.`);
32+
if (!REPO_PATH.startsWith('http') && !REPO_PATH.startsWith('git') && !REPO_PATH.startsWith('/')) {
33+
console.error(`Error: ${REPO_PATH} is not a recognized Git URL or local path.`);
3434
process.exit(1);
3535
}
3636

0 commit comments

Comments
 (0)