about summary refs log tree commit diff
path: root/maintainers/scripts
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2023-01-02 14:00:58 +0100
committerNaïm Favier <n@monade.li>2023-01-02 14:11:22 +0100
commita8d4cf149cda4f82145291cc9a6819a9baa3951e (patch)
treea92d5a3a9c5bff6a5969561910113d9f8f88e6b6 /maintainers/scripts
parent5a9a3353342fc2a964c58f91ef8cbb19585c3af8 (diff)
doc: separate manpage URLs from the Pandoc filter
Move the manpage-to-URL mapping to `doc/manpage-urls.json` so that we can
reuse that file elsewhere, and generate the `link-manpages.lua` filter from
that file.

Also modify the Pandoc filter so that it doesn't wrap manpages that are
already inside a link.

Keeping a Lua filter is essential for speed: a Python filter would
increase the runtime `md-to-db.sh` from ~20s to ~30s (but Python is not
to blame; marshalling Pandoc types to and from JSON is a costly operation).
Parsing in Lua seems tedious, so I went with the Nix way.
Diffstat (limited to 'maintainers/scripts')
-rwxr-xr-xmaintainers/scripts/db-to-md.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/maintainers/scripts/db-to-md.sh b/maintainers/scripts/db-to-md.sh
index 01357d1e24120..aa2a2775b6dea 100755
--- a/maintainers/scripts/db-to-md.sh
+++ b/maintainers/scripts/db-to-md.sh
@@ -41,7 +41,7 @@ pandoc_flags=(
     # - diagram-generator.lua (we do not support that in NixOS manual to limit dependencies)
     # - media extraction (was only required for diagram generator)
     # - myst-reader/roles.lua (only relevant for MyST → DocBook)
-    # - link-unix-man-references.lua (links should only be added to display output)
+    # - link-manpages.lua (links should only be added to display output)
     # - docbook-writer/rst-roles.lua (only relevant for → DocBook)
     # - docbook-writer/labelless-link-is-xref.lua (only relevant for → DocBook)
     "--lua-filter=$DIR/../../doc/build-aux/pandoc-filters/docbook-reader/citerefentry-to-rst-role.lua"