diff --git a/Makefile.am b/Makefile.am index 50443abc..56a1c3e1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -174,6 +174,29 @@ if WITH_HTMLPROOFER # rebuilds of the site we have possibly just made. Instead, these rules # just check whatever exists in the filesystem. +# * --disable_external +# By default, we avoid looking at remote website availability. +# This is something we may want to do occasionally (replace dead links +# by references to new incarnations or archive.org) but not take the +# performance hit (and annoy others) for every CI run - in that case +# consider a run with --external_only option to explicitly test that. +# * --allow_hash_href +# We also allow commonly used in javascript etc. +# * --assume_extension +# allow extensionles urls (Jekyll3) +HTMLPROOFER_OPTIONS_DEFAULT = \ + --disable_external \ + --allow_hash_href \ + --assume_extension + +# CONSIDER: +# * --empty_alt_ignore +# Temporarily allow empty alt tags on images +# HTMLPROOFER_OPTIONS_DEFAULT += --empty_alt_ignore + +# Allow the caller an easy override: +HTMLPROOFER_OPTIONS = $(HTMLPROOFER_OPTIONS_DEFAULT) + check-htmlproofer: +@case "$(OUTDIR)" in \ "$(OUTDIR_BASE)"|"$(OUTDIR_BASE)/"*) $(MAKE) $(AM_MAKEFLAGS) check-htmlproofer-OUTDIR_BASE ;; \ @@ -182,17 +205,17 @@ check-htmlproofer: check-htmlproofer-OUTDIR: test -d $(OUTDIR) - $(HTMLPROOFER) $(OUTDIR) + $(HTMLPROOFER) $(HTMLPROOFER_OPTIONS) $(OUTDIR) check-htmlproofer-OUTDIR_BASE: test -d $(OUTDIR_BASE) - $(HTMLPROOFER) $(OUTDIR_BASE) + $(HTMLPROOFER) $(HTMLPROOFER_OPTIONS) $(OUTDIR_BASE) # Fetched/updated via git checkout, e.g. by ci_build.sh OUTDIR_PUBLISHED = networkupstools.github.io check-htmlproofer-OUTDIR_PUBLISHED: test -d $(OUTDIR_PUBLISHED) - $(HTMLPROOFER) $(OUTDIR_PUBLISHED) + $(HTMLPROOFER) $(HTMLPROOFER_OPTIONS) $(OUTDIR_PUBLISHED) else !WITH_HTMLPROOFER diff --git a/README.asciidoc b/README.asciidoc index 8be0dfa7..f3a40421 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -221,6 +221,7 @@ location for that repository, if not using the scripted default). Note that this check can take about 10 minutes (especially if not disabling the referenced external site availability), so it is not done by default. +You can pass custom `HTMLPROOFER_OPTIONS` to the `make` operation, if desired. Publishing ----------