mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-22 15:04:46 +03:00
docs: remove spam from flake-outputs
...instead use internal options to pass the module docs pages to the renderer
This commit is contained in:
parent
3f6c7cbd80
commit
95fa909f84
@ -355,9 +355,14 @@ in {
|
||||
type = types.attrsOf (types.submodule inputModule);
|
||||
};
|
||||
};
|
||||
generated-docs = mkOption {
|
||||
type = types.raw;
|
||||
description = "Generated documentation.";
|
||||
readOnly = true;
|
||||
};
|
||||
};
|
||||
config = {
|
||||
packages =
|
||||
generated-docs =
|
||||
lib.mapAttrs' (name: inputCfg: {
|
||||
name = "generated-docs-${name}";
|
||||
value = inputCfg.rendered;
|
||||
|
@ -84,7 +84,7 @@
|
||||
case "$ln" in
|
||||
"# Modules Reference")
|
||||
echo "# Modules Reference"
|
||||
cat ${self'.packages.generated-summary-md}
|
||||
cat ${config.generated-docs.generated-summary-md}
|
||||
;;
|
||||
*)
|
||||
echo "$ln"
|
||||
@ -97,7 +97,7 @@
|
||||
cp ${../../dream2nix/core/docs/theme/favicon.png} ./theme/favicon.png
|
||||
|
||||
mkdir -p src/options
|
||||
for f in ${config.packages.generated-docs}/*.html; do
|
||||
for f in ${config.generated-docs.generated-docs}/*.html; do
|
||||
cp "$f" "src/options/$(basename "$f" .html).md"
|
||||
done
|
||||
mdbook build --dest-dir $TMPDIR/out
|
||||
|
Loading…
Reference in New Issue
Block a user