From bb2c5a3684a5b7240c7104a095077947029319b7 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 1 May 2022 21:50:51 +0200 Subject: [PATCH] nixosOptionsDoc: Make appendix tag optional --- nixos/lib/make-options-doc/default.nix | 3 +++ .../make-options-doc/options-to-docbook.xsl | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/nixos/lib/make-options-doc/default.nix b/nixos/lib/make-options-doc/default.nix index 57652dd5db1e..353fdb87a9f1 100644 --- a/nixos/lib/make-options-doc/default.nix +++ b/nixos/lib/make-options-doc/default.nix @@ -20,6 +20,8 @@ , lib , options , transformOptions ? lib.id # function for additional tranformations of the options +, documentType ? "appendix" # TODO deprecate "appendix" in favor of "none" + # and/or rename function to moduleOptionDoc for clean slate , revision ? "" # Specify revision for the options # a set of options the docs we are generating will be merged into, as if by recursiveUpdate. # used to split the options doc build into a static part (nixos/modules) and a dynamic part @@ -161,6 +163,7 @@ in rec { ${pkgs.python3Minimal}/bin/python ${./sortXML.py} $optionsXML sorted.xml ${pkgs.libxslt.bin}/bin/xsltproc \ + --stringparam documentType '${documentType}' \ --stringparam revision '${revision}' \ -o intermediate.xml ${./options-to-docbook.xsl} sorted.xml ${pkgs.libxslt.bin}/bin/xsltproc \ diff --git a/nixos/lib/make-options-doc/options-to-docbook.xsl b/nixos/lib/make-options-doc/options-to-docbook.xsl index b286f7b5e2c0..b1a5e5315dd0 100644 --- a/nixos/lib/make-options-doc/options-to-docbook.xsl +++ b/nixos/lib/make-options-doc/options-to-docbook.xsl @@ -12,12 +12,25 @@ + - - Configuration Options + + + + Configuration Options + + + + + + + + + + @@ -96,7 +109,6 @@ -