aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/generate-xp-features.nix
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual/generate-xp-features.nix')
-rw-r--r--doc/manual/generate-xp-features.nix22
1 files changed, 6 insertions, 16 deletions
diff --git a/doc/manual/generate-xp-features.nix b/doc/manual/generate-xp-features.nix
index ff64edcf7..adb94355c 100644
--- a/doc/manual/generate-xp-features.nix
+++ b/doc/manual/generate-xp-features.nix
@@ -1,21 +1,11 @@
-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";
+ showExperimentalFeature = name: doc:
+ squash ''
+ ## [`${name}`]{#xp-feature-${name}}
-in (listToAttrs featurePages) // { "SUMMARY.md" = tableOfContents; }
+ ${doc}
+ '';
+in xps: (concatStringsSep "\n" (attrValues (mapAttrs showExperimentalFeature xps)))