aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/book.toml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual/book.toml')
-rw-r--r--doc/manual/book.toml20
1 files changed, 11 insertions, 9 deletions
diff --git a/doc/manual/book.toml b/doc/manual/book.toml
index e03bed737..ae4ff9b35 100644
--- a/doc/manual/book.toml
+++ b/doc/manual/book.toml
@@ -7,20 +7,22 @@ additional-js = ["redirects.js"]
edit-url-template = "https://github.com/NixOS/nix/tree/master/doc/manual/{path}"
git-repository-url = "https://github.com/NixOS/nix"
-# Handles replacing @docroot@ with a path to ./src relative to that markdown file.
-[preprocessor.docroot]
-renderers = ["html", "linkcheck"]
-command = "python3 doc/manual/docroot.py"
-# I would have thought that @docroot@ replacement had to be done *before*
-# the link preprocessor gets its hands on this book, but nope it's actually
-# the opposite.
-after = ["links"]
-before = ["anchors"]
+# Handles replacing @docroot@ with a path to ./src relative to that markdown file,
+# {{#include handlebars}}, and the @generated@ syntax used within these. it mostly
+# but not entirely replaces the links preprocessor (which we cannot simply use due
+# to @generated@ files living in a different directory to make meson happy). we do
+# not want to disable the links preprocessor entirely though because that requires
+# disabling *all* built-in preprocessors and selectively reenabling those we want.
+[preprocessor.substitute]
+command = "python3 doc/manual/substitute.py"
+before = ["anchors", "links"]
[preprocessor.anchors]
renderers = ["html"]
command = "jq --from-file doc/manual/anchors.jq"
+[output.markdown]
+
[output.linkcheck]
# no Internet during the build (in the sandbox)
follow-web-links = false