Skip to content

Commit

Permalink
167 add support to link check (#173)
Browse files Browse the repository at this point in the history
* refs #167: add support to link check

Using [markdown-link-validator](https://github.com/jenkin/markdown-link-validator/tree/feature/sparkfabrik-enhancements) from github repo.

Build the docker image and run validation with `make check`.

* refs #167: update link checker

* refs #167: add pre-commit hook

See
[issues/167#issuecomment-1589456767](#167 (comment)).
  • Loading branch information
jenkin authored Jun 27, 2023
1 parent c1c9d19 commit aa1d280
Show file tree
Hide file tree
Showing 8 changed files with 537 additions and 45 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ cli:
logs:
docker-compose logs -f

check:
docker-compose run --rm documentation npm run check

# Sparkkit based themes specific commands.
theme-watch:
chmod +x bin/npm
Expand Down
5 changes: 5 additions & 0 deletions content/.mlvignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
^/downloads/
drupal.org
udemy.com
sparkfabrik.loc
acme.sparkfabrik.com
Empty file.
Empty file.
Empty file.
4 changes: 4 additions & 0 deletions custom/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

make check
554 changes: 514 additions & 40 deletions custom/package-lock.json

Large diffs are not rendered by default.

16 changes: 11 additions & 5 deletions custom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@
"author": "Paolo Pustorino <[email protected]>",
"main": "server.js",
"scripts": {
"start": "node server.js",
"test": "echo \"Error: no test specified\" && exit 1"
"start": "node server.js",
"check": "markdown-link-validator -q -e -o -c 403 --ignorePatternsFrom ./content/.mlvignore ./content",
"test": "echo \"Error: no test specified\" && exit 1",
"prepare": "cd .. && husky install custom/.husky"
},
"license": "https://creativecommons.org/licenses/by-sa/4.0/",
"dependencies": {
"raneto": "0.17.3",
"gulp": "4.0.2"
"gulp": "4.0.2",
"markdown-link-validator": "github:jenkin/markdown-link-validator#feature/sparkfabrik-enhancements",
"raneto": "0.17.3"
},
"devDependencies": {
"husky": "^8.0.3"
}
}
}

0 comments on commit aa1d280

Please sign in to comment.