diff options
author | pennae <github@quasiparticle.net> | 2022-12-30 20:43:53 +0100 |
---|---|---|
committer | pennae <82953136+pennae@users.noreply.github.com> | 2023-01-05 02:33:13 +0100 |
commit | 4c1cfbdb844babe1054c7f365eac337396092d60 (patch) | |
tree | 1217ab10980ba73615c462c2761388dbd808a0db /nixos/lib/make-options-doc | |
parent | b2054d3f2d900b1f37639e654624f745d4191fe6 (diff) |
modules: add mkAliasOptionModuleMD
mkAliasOptionModule should not default to mdDoc descriptions because that can break out-of-tree users of documentation infrastructure. add an explicitly-MD variant for now, to be removed some time after the MD transition is complete.
Diffstat (limited to 'nixos/lib/make-options-doc')
-rw-r--r-- | nixos/lib/make-options-doc/mergeJSON.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nixos/lib/make-options-doc/mergeJSON.py b/nixos/lib/make-options-doc/mergeJSON.py index 750cd24fc653d..1e06fe92a223c 100644 --- a/nixos/lib/make-options-doc/mergeJSON.py +++ b/nixos/lib/make-options-doc/mergeJSON.py @@ -306,14 +306,16 @@ if hasDocBookErrors: print("Explanation: The documentation contains descriptions, examples, or defaults written in DocBook. " + "NixOS is in the process of migrating from DocBook to Markdown, and " + "DocBook is disallowed for in-tree modules. To change your contribution to "+ - "use Markdown, apply mdDoc and literalMD. For example:\n" + + "use Markdown, apply mdDoc and literalMD and use the *MD variants of option creation " + + "functions where they are available. For example:\n" + "\n" + " example.foo = mkOption {\n" + " description = lib.mdDoc ''your description'';\n" + " defaultText = lib.literalMD ''your description of default'';\n" + - " }\n" + + " };\n" + "\n" + - " example.enable = mkEnableOption (lib.mdDoc ''your thing'');", + " example.enable = mkEnableOption (lib.mdDoc ''your thing'');\n" + + " imports = [ (mkAliasOptionModuleMD [ \"example\" \"args\" ] [ \"example\" \"settings\" ]) ];", file = sys.stderr) if hasErrors: |