aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorClément Bénier <clement.benier@iot.bzh>2019-03-29 16:43:47 +0100
committerClément Bénier <clement.benier@iot.bzh>2019-03-29 16:43:47 +0100
commit657afcf4e2bb93255d722b8019a2a352ffc534d1 (patch)
tree22d11fda0923c434ceb494b2a46bc766e8541ed3 /Makefile
parent768b049078c083436dcb7eeebfd816c68f2aa5cf (diff)
Makefile: add linkchecker rule to check links
Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index f097a0d..26a6688 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,7 @@ help:
@echo -e "- make build VERSIONS=[VERSION,...] SECTIONS=[SECTION,...]: build the site"
@echo -e "- make push VERSIONS=[VERSION,...] SECTIONS=[SECTION,...]: push the built site"
@echo -e "- make serve VERSIONS=[VERSION,...] SECTIONS=[SECTION,...]: serve the site"
+ @echo -e "- make linkchecker: check link in the local site, PORT=[default:4000]"
@echo -e
@echo -e "VERSIONS="
@echo -e "\t represents the desired versions, separated with ,"
@@ -56,3 +57,10 @@ push: $(FETCHTS)
serve: $(FETCHTS)
$(DOCBUILD) $(VERBOSE) --build --serve
+.PHONY: linkchecker
+linkchecker: $(FETCHS)
+ @which linkchecker &> /dev/null || { echo "No linkchecker found, please install linkchecker"; exit -1; }
+ @curl http://localhost:4000 &> /dev/null || { echo "No localhost:4000 found: Please run make serve before checking localsite"; exit -1; }
+ linkchecker http://localhost:4000
+
+