From 07ef9f9f5d88f4d278291d78faf2e0b0a067cb8e Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Mon, 8 Apr 2024 04:55:18 +0200 Subject: [PATCH] docs: skip do custom include processing for mdbook mdbook already does include processing of its own, and the custom processing code has always admitted as much. we don't need it for the mdbook build at this point if we run our preprocessors in the right order, and maybe we can even have mdbook to return complete pages to us that we only have to pass to lowdown without any more preprocessing of our own. Change-Id: Icd978acbc3b1e215fee8f062c53ab2cb2a222ab1 --- doc/manual/book.toml | 1 + doc/manual/local.mk | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/manual/book.toml b/doc/manual/book.toml index 1d14347a4..e03bed737 100644 --- a/doc/manual/book.toml +++ b/doc/manual/book.toml @@ -15,6 +15,7 @@ command = "python3 doc/manual/docroot.py" # the link preprocessor gets its hands on this book, but nope it's actually # the opposite. after = ["links"] +before = ["anchors"] [preprocessor.anchors] renderers = ["html"] diff --git a/doc/manual/local.mk b/doc/manual/local.mk index e7c029727..5d05bbdcc 100644 --- a/doc/manual/local.mk +++ b/doc/manual/local.mk @@ -163,9 +163,6 @@ $(docdir)/manual/index.html: $(MANUAL_SRCS) $(d)/book.toml $(d)/anchors.jq $(d)/ $(trace-gen) \ tmp="$$(mktemp -d)"; \ cp -r doc/manual "$$tmp"; \ - find "$$tmp" -name '*.md' | while read -r file; do \ - doc/manual/process-includes.sh $$file $$file; \ - done; \ set -euo pipefail; \ RUST_LOG=warn mdbook build "$$tmp/manual" -d $(DESTDIR)$(docdir)/manual.tmp 2>&1 \ | { grep -Fv "because fragment resolution isn't implemented" || :; }; \