lix/doc/manual/generate-xp-features.nix

22 lines
479 B
Nix
Raw Normal View History

xps:
with builtins;
with import ./utils.nix;
let
makePage = { name, value }:
{
name = "${name}.md";
inherit value;
feature = name;
};
featurePages = map makePage (attrsToList xps);
tableOfContents = let
showEntry = page:
" - [${page.feature}](contributing/experimental-features/${page.name})";
in concatStringsSep "\n" (map showEntry featurePages) + "\n";
in (listToAttrs featurePages) // { "SUMMARY.md" = tableOfContents; }