guidelines/Makefile
FeRD (Frank Dana) 43294c77c6 linkchecker: Add ignores for housekeeping links
The Antora server will include a language-switching link
and an edit link for each file, both of which aren't
valid in the preview and need to be ignored.

The edit link takes the form `file:///antora/...`,
a path that's only valid inside the container.

The language link points from every document
`https://localhost:8080/guidelines/foo`
to a language-specific URL like
`https://localhost:8080/en-US/guidelines/foo`

The latter may need to be tweaked if they're dependent on
the system locale of the user running linkchecker.
Ignoring `https://localhost:8080/en-US` works for me,
but may not be universal.
2026-01-08 17:52:54 +00:00

28 lines
622 B
Makefile

mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
mkfile_dir := $(patsubst %/,%,$(dir $(mkfile_path)))
docsbuilder := $(abspath $(mkfile_dir)/docsbuilder.sh)
doc:
$(docsbuilder) -b
build: doc
.ONESHELL:
serve:
$(info *** Make sure to refresh pages without cache ***)
$(docsbuilder) -p
watch:
$(docsbuilder) -a
linkcheck:
$(docsbuilder) -k
$(docsbuilder) -p
linkchecker http://localhost:8080 --check-extern --no-robots \
--ignore-url "drupal.org" \
--ignore-url "file:///antora" \
--ignore-url 'http://localhost:8080/en-US'
$(docsbuilder) -k
.DEFAULT_GOAL := doc
.PHONY: doc linkcheck serve watch