docs/man: include all sections from lib-doc

This commit is contained in:
Matt Sturgeon 2025-05-15 17:38:40 +01:00
parent 0c7e2aa96b
commit 83d3535097
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
2 changed files with 17 additions and 5 deletions

View file

@ -84,6 +84,16 @@ runCommand "nixvim-lib-docs"
inherit lib; inherit lib;
pageSpecs = elaboratedPageSpecs; pageSpecs = elaboratedPageSpecs;
}; };
passthru.pages = builtins.listToAttrs (
builtins.map (
{ name, outFile, ... }:
{
inherit name;
value = outFile;
}
) pagesToRender
);
} }
'' ''
function docgen { function docgen {

View file

@ -8,6 +8,12 @@
pandoc, pandoc,
}: }:
let let
markdownSections =
lib.mapAttrsToList (name: file: "${lib-docs}/${file}") lib-docs.pages
++ [
../user-guide/faq.md
../user-guide/config-examples.md
];
manHeader = manHeader =
runCommand "nixvim-general-doc-manpage" runCommand "nixvim-general-doc-manpage"
{ {
@ -23,11 +29,7 @@ let
( (
cat ${./nixvim-header-start.5} cat ${./nixvim-header-start.5}
${lib.concatMapStringsSep "\n" (file: "mkMDSection ${file}") [ ${lib.concatMapStringsSep "\n" (file: "mkMDSection ${file}") markdownSections}
"${lib-docs}/lib/index.md"
../user-guide/faq.md
../user-guide/config-examples.md
]}
cat ${./nixvim-header-end.5} cat ${./nixvim-header-end.5}
) >$out/nixvim-header.5 ) >$out/nixvim-header.5