diff --git a/.gitignore b/.gitignore index 4c10f438e..048da127c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,7 @@ public/ resources/ *idea* + +# Link checker +bin/ +tmp/ diff --git a/.htmltest.yml b/.htmltest.yml new file mode 100644 index 000000000..50cbb62c3 --- /dev/null +++ b/.htmltest.yml @@ -0,0 +1,4 @@ +DirectoryPath: public +IgnoreDirectoryMissingTrailingSlash: true +CheckExternal: false +IgnoreAltMissing: true diff --git a/Makefile b/Makefile index 57b896c91..7cc7318f5 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +clean: + rm -rf public + dependencies: (cd themes/falco-fresh && npm install) @@ -7,10 +10,23 @@ serve: dependencies --buildFuture production-build: dependencies - hugo + hugo --minify + make check-links preview-build: dependencies hugo \ --baseURL $(DEPLOY_PRIME_URL) \ --buildDrafts \ - --buildFuture + --buildFuture \ + --minify + make check-links + +link-checker-setup: + curl https://raw.githubusercontent.com/wjdp/htmltest/master/godownloader.sh | bash + +run-link-checker: + bin/htmltest + +check-links: link-checker-setup run-link-checker + +check-links-locally: clean production-build check-links