From cb4a0276aadbc40a403ea1dcd4b20ef0dc0e9679 Mon Sep 17 00:00:00 2001 From: Martin Schroschk <martin.schroschk@tu-dresden.de> Date: Fri, 4 Oct 2024 13:56:47 +0200 Subject: [PATCH] Add option to check only internal links for MR --- doc.zih.tu-dresden.de/util/check-links.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc.zih.tu-dresden.de/util/check-links.sh b/doc.zih.tu-dresden.de/util/check-links.sh index 10f91b6ce..597038046 100755 --- a/doc.zih.tu-dresden.de/util/check-links.sh +++ b/doc.zih.tu-dresden.de/util/check-links.sh @@ -36,6 +36,7 @@ usage: $0 [file | -a | -c] Options: <file> Check links in the provided markdown file -a; --all Check links in all markdown files + -i; --interal Check links in all markdown files (internal links only) -c; --changed Check links in all git-changed files EOF } @@ -101,7 +102,6 @@ function check_changed_files(){ # Make use of the html-proofer-plugin and build documentation function check_all_files_hpp() { export ENABLED_HTMLPROOFER=true - export ENABLED_HTMLPROOFER_EXTERNAL_URLS=true echo "Info: Building documentation and checking internal and external links. Might take some time." # Switch for wikiscript if [[ -d "doc.zih.tu-dresden.de" ]]; then @@ -118,6 +118,11 @@ if [[ $# -ge 1 ]]; then exit ;; -a | --all) + export ENABLED_HTMLPROOFER_EXTERNAL_URLS=true + check_all_files_hpp + ;; + -i | --internal) + export ENABLED_HTMLPROOFER_EXTERNAL_URLS=false check_all_files_hpp ;; -c | --changed) -- GitLab