about summary refs log tree commit diff
path: root/nixos/doc/manual/md-to-db.sh
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2023-01-25 00:33:40 +0100
committerpennae <github@quasiparticle.net>2023-01-27 20:07:34 +0100
commit0a6e6cf7e698a6a08a62d8863e2c66b36d5db0d9 (patch)
tree6e28cb9ba90a3d03d6efab999b958527af45f84c /nixos/doc/manual/md-to-db.sh
parent8b8670db100efed03a979f7ec24c353f72c0bdbd (diff)
nixos/manual: render module chapters with nixos-render-docs
this converts meta.doc into an md pointer, not an xml pointer. since we
no longer need xml for manual chapters we can also remove support for
manual chapters from md-to-db.sh

since pandoc converts smart quotes to docbook quote elements and our
nixos-render-docs does not we lose this distinction in the rendered
output. that's probably not that bad, our stylesheet didn't make use of
this anyway (and pre-23.05 versions of the chapters didn't use quote
elements either).

also updates the nixpkgs manual to clarify that option docs support all
extensions (although it doesn't support headings at all, so heading
anchors don't work by extension).
Diffstat (limited to 'nixos/doc/manual/md-to-db.sh')
-rwxr-xr-xnixos/doc/manual/md-to-db.sh18
1 files changed, 0 insertions, 18 deletions
diff --git a/nixos/doc/manual/md-to-db.sh b/nixos/doc/manual/md-to-db.sh
index a7421bed532e8..4698e94f508b3 100755
--- a/nixos/doc/manual/md-to-db.sh
+++ b/nixos/doc/manual/md-to-db.sh
@@ -50,21 +50,3 @@ for mf in ${MD_FILES[*]}; do
 done
 
 popd
-
-# now handle module chapters. we'll need extra checks to ensure that we don't process
-# markdown files we're not interested in, so we'll require an x.nix file for ever x.md
-# that we'll convert to xml.
-pushd "$DIR/../../modules"
-
-mapfile -t MD_FILES < <(find . -type f -regex '.*\.md$')
-
-for mf in ${MD_FILES[*]}; do
-  [ -f "${mf%.md}.nix" ] || continue
-
-  pandoc --top-level-division=chapter "$mf" "${pandoc_flags[@]}" -o "${mf%.md}.xml"
-  sed -i -e '1 i <!-- Do not edit this file directly, edit its companion .md instead\
-     and regenerate this file using nixos/doc/manual/md-to-db.sh -->' \
-    "${mf%.md}.xml"
-done
-
-popd