summary refs log tree commit diff
path: root/doc/Makefile
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2021-07-12 15:54:14 +0200
committerJan Tojnar <jtojnar@gmail.com>2021-07-13 02:10:57 +0200
commitc9139dfa1a001e32baa6fea9c9373d80c83e39e9 (patch)
treea55bbcb0aa06d5568f4682533846d9a23d48e46f /doc/Makefile
parentdf55fbb62aea05fa3e48c4f7c2021bba49485ed5 (diff)
downloadnixpkgs-c9139dfa1a001e32baa6fea9c9373d80c83e39e9.tar
nixpkgs-c9139dfa1a001e32baa6fea9c9373d80c83e39e9.tar.gz
nixpkgs-c9139dfa1a001e32baa6fea9c9373d80c83e39e9.tar.bz2
nixpkgs-c9139dfa1a001e32baa6fea9c9373d80c83e39e9.tar.lz
nixpkgs-c9139dfa1a001e32baa6fea9c9373d80c83e39e9.tar.xz
nixpkgs-c9139dfa1a001e32baa6fea9c9373d80c83e39e9.tar.zst
nixpkgs-c9139dfa1a001e32baa6fea9c9373d80c83e39e9.zip
doc: Add support for MyST roles
Officially, only the manpage role is supported at the moment.

Unlike in rST, the syntax uses braces instead of colons:

    {manpage}`nix.conf(5)`
Diffstat (limited to 'doc/Makefile')
-rw-r--r--doc/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 6eeaeca303c..9bcd30c150a 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -6,8 +6,12 @@ pandoc_media_dir = media
 # NOTE: Keep in sync with NixOS manual (/nixos/doc/manual/md-to-db.sh).
 # TODO: Remove raw-attribute when we can get rid of DocBook altogether.
 pandoc_commonmark_enabled_extensions = +attributes+fenced_divs+footnotes+bracketed_spans+definition_lists+pipe_tables+raw_attribute
+# Not needed:
+# - docbook-reader/citerefentry-to-rst-role.lua (only relevant for DocBook → MarkDown/rST/MyST)
 pandoc_flags = --extract-media=$(pandoc_media_dir) \
 	--lua-filter=$(PANDOC_LUA_FILTERS_DIR)/diagram-generator.lua \
+	--lua-filter=build-aux/pandoc-filters/myst-reader/roles.lua \
+	--lua-filter=build-aux/pandoc-filters/docbook-writer/rst-roles.lua \
 	--lua-filter=build-aux/pandoc-filters/docbook-writer/labelless-link-is-xref.lua \
 	-f commonmark$(pandoc_commonmark_enabled_extensions)+smart