From 657afcf4e2bb93255d722b8019a2a352ffc534d1 Mon Sep 17 00:00:00 2001 From: Clément Bénier Date: Fri, 29 Mar 2019 16:43:47 +0100 Subject: Makefile: add linkchecker rule to check links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Clément Bénier --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Makefile') 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 + + -- cgit 1.2.3-korg