Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

167 add support to link check #173

Merged
merged 3 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

come mai stiamo usando un fork ? devo aver perso qualche passaggio

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paolomainardi Ho provato alcune soluzioni già pronte (come il markdown-link-check che hai menzionato anche tu o l'originale markdown-link-validator), ma nessuna soddisfa pienamente i nostri requisiti. Vedi #167 (in particolare la sezione drawbacks).

Alla fine ho optato per forkare markdown-link-validator e aggiungere le funzionalità che ci servono.

Tutte le modifiche fatte sono retrocompatibili per quanto riguarda le API della CLI e a mio avviso di interesse abbastanza generale da poter essere anche rilasciate (ho anche corretto alcune issue ancora aperte). Ma prima di proporre eventuali PR al repo originale aspettavo di integrare il tutto nel playbook e fare più test.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok 👍 grazie!

"raneto": "0.17.3"
},
"devDependencies": {
"husky": "^8.0.3"
}
}
}