Skip to content

Commit

Permalink
Add link checker to CI pipeline
Browse files Browse the repository at this point in the history
Signed-off-by: lucperkins <lucperkins@gmail.com>
  • Loading branch information
lucperkins authored and poiana committed Apr 1, 2020
1 parent e1d1a00 commit 206a1ac
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
public/
resources/
*idea*

# Link checker
bin/
tmp/
4 changes: 4 additions & 0 deletions .htmltest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DirectoryPath: public
IgnoreDirectoryMissingTrailingSlash: true
CheckExternal: false
IgnoreAltMissing: true
20 changes: 18 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
clean:
rm -rf public

dependencies:
(cd themes/falco-fresh && npm install)

Expand All @@ -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

0 comments on commit 206a1ac

Please sign in to comment.