manual: Check links
mdbook-linkcheck is not consistent about its warning setting. It disables some warnings, but not the warnings about lack of fragment checking support; hence the extra filtering.
This commit is contained in:
parent
4e2b155d23
commit
be10c09d23
|
@ -10,3 +10,12 @@ git-repository-url = "https://github.com/NixOS/nix"
|
||||||
[preprocessor.anchors]
|
[preprocessor.anchors]
|
||||||
renderers = ["html"]
|
renderers = ["html"]
|
||||||
command = "jq --from-file doc/manual/anchors.jq"
|
command = "jq --from-file doc/manual/anchors.jq"
|
||||||
|
|
||||||
|
[output.linkcheck]
|
||||||
|
# no Internet during the build (in the sandbox)
|
||||||
|
follow-web-links = false
|
||||||
|
|
||||||
|
# mdbook-linkcheck does not understand [foo]{#bar} style links, resulting in
|
||||||
|
# excessive "Potential incomplete link" warnings. No other kind of warning was
|
||||||
|
# produced at the time of writing.
|
||||||
|
warning-policy = "ignore"
|
||||||
|
|
|
@ -102,6 +102,9 @@ doc/manual/generated/man1/nix3-manpages: $(d)/src/command-ref/new-cli
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
||||||
$(docdir)/manual/index.html: $(MANUAL_SRCS) $(d)/book.toml $(d)/anchors.jq $(d)/custom.css $(d)/src/SUMMARY.md $(d)/src/command-ref/new-cli $(d)/src/command-ref/conf-file.md $(d)/src/language/builtins.md
|
$(docdir)/manual/index.html: $(MANUAL_SRCS) $(d)/book.toml $(d)/anchors.jq $(d)/custom.css $(d)/src/SUMMARY.md $(d)/src/command-ref/new-cli $(d)/src/command-ref/conf-file.md $(d)/src/language/builtins.md
|
||||||
$(trace-gen) RUST_LOG=warn mdbook build doc/manual -d $(DESTDIR)$(docdir)/manual
|
$(trace-gen) \
|
||||||
|
set -euo pipefail; \
|
||||||
|
RUST_LOG=warn mdbook build doc/manual -d $(DESTDIR)$(docdir)/manual 2>&1 \
|
||||||
|
| { grep -Fv "because fragment resolution isn't implemented" || :; }
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -96,6 +96,7 @@
|
||||||
buildPackages.flex
|
buildPackages.flex
|
||||||
(lib.getBin buildPackages.lowdown-nix)
|
(lib.getBin buildPackages.lowdown-nix)
|
||||||
buildPackages.mdbook
|
buildPackages.mdbook
|
||||||
|
buildPackages.mdbook-linkcheck
|
||||||
buildPackages.autoconf-archive
|
buildPackages.autoconf-archive
|
||||||
buildPackages.autoreconfHook
|
buildPackages.autoreconfHook
|
||||||
buildPackages.pkg-config
|
buildPackages.pkg-config
|
||||||
|
|
Loading…
Reference in a new issue