Add link checker

Signed-off-by: lucperkins <lucperkins@gmail.com>
This commit is contained in:
lucperkins 2020-03-06 13:05:46 -08:00
parent f3397321d9
commit 2f0d53de24
5 changed files with 32 additions and 4 deletions

4
.gitignore vendored
View File

@ -12,3 +12,7 @@ $RECYCLE.BIN/
# OSX
.DS_Store
*~
# Link checker
bin/
tmp/

3
.htmltest.external.yml Normal file
View File

@ -0,0 +1,3 @@
DirectoryPath: public
IgnoreDirectoryMissingTrailingSlash: true
IgnoreAltMissing: true

4
.htmltest.yml Normal file
View File

@ -0,0 +1,4 @@
DirectoryPath: public
IgnoreDirectoryMissingTrailingSlash: true
CheckExternal: false
IgnoreAltMissing: true

View File

@ -2,6 +2,9 @@ HUGO_VERSION = 0.66.0
DOCKER_IMG := klakegg/hugo:$(HUGO_VERSION)
SERVE_CMD = server --buildDrafts --buildFuture --disableFastRender --ignoreCache
clean:
rm -rf public resources
serve:
hugo server \
--buildDrafts \
@ -11,13 +14,28 @@ serve:
docker-serve:
docker run --rm -it -v $(CURDIR):/src -p 1313:1313 $(DOCKER_IMG) $(SERVE_CMD)
production-build:
production-build: clean
hugo \
--minify
preview-build:
make check-internal-links
preview-build: clean
hugo \
--baseURL $(DEPLOY_PRIME_URL) \
--buildDrafts \
--buildFuture \
--minify
make check-internal-links
link-checker-setup:
curl https://raw.githubusercontent.com/wjdp/htmltest/master/godownloader.sh | bash
run-link-checker:
bin/htmltest
check-internal-links: link-checker-setup run-link-checker
check-all-links: link-checker-setup
bin/htmltest --conf .htmltest.external.yml

View File

@ -729,8 +729,7 @@ response to the client.
### 2.4.4: The GreeterTimer Client
The
[go client](go/main.go)
The [Go client](go/main.go)
prepares a `TimerRequest` and gets back a stream interface from the
`client.TimeHello` method. We call its `Recv()` method until EOF, at
which point the call is complete. A summary of each BatchResponse is