mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 22:48:02 +03:00
docs: better summary + embed modules README.md
This commit is contained in:
parent
c3c5769aba
commit
731ac1daf1
1
modules/dream2nix/mkDerivation/README.md
Normal file
1
modules/dream2nix/mkDerivation/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
A package module based on the mkDerivation builder from nixpkgs
|
@ -222,10 +222,10 @@ in {
|
|||||||
installation = mkOption {
|
installation = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = ''
|
description = ''
|
||||||
Installation paragraph between installation and options.
|
Paragraph between import and options.
|
||||||
'';
|
'';
|
||||||
default = ''
|
default = ''
|
||||||
## Installation
|
## Import
|
||||||
|
|
||||||
To import this module into your dream2nix package:
|
To import this module into your dream2nix package:
|
||||||
|
|
||||||
@ -354,7 +354,6 @@ in {
|
|||||||
# - [Reference Documentation]()
|
# - [Reference Documentation]()
|
||||||
# - [core (built in)](./options/core.md)
|
# - [core (built in)](./options/core.md)
|
||||||
generated-summary-md = pkgs.writeText "SUMMARY.md" ''
|
generated-summary-md = pkgs.writeText "SUMMARY.md" ''
|
||||||
- [Reference Documentation]()
|
|
||||||
${
|
${
|
||||||
lib.concatStringsSep "\n"
|
lib.concatStringsSep "\n"
|
||||||
(lib.mapAttrsToList
|
(lib.mapAttrsToList
|
||||||
|
@ -53,7 +53,24 @@
|
|||||||
|
|
||||||
rm ./src/intro.md
|
rm ./src/intro.md
|
||||||
cp ${self + /README.md} ./src/intro.md
|
cp ${self + /README.md} ./src/intro.md
|
||||||
cat ${self'.packages.generated-summary-md} >> ./src/SUMMARY.md
|
|
||||||
|
cp ./src/SUMMARY.md SUMMARY.md.orig
|
||||||
|
|
||||||
|
# insert the generated part of the summary into the origin SUMMARY.md
|
||||||
|
{
|
||||||
|
while read ln; do
|
||||||
|
case "$ln" in
|
||||||
|
"# Modules Reference")
|
||||||
|
echo "# Modules Reference"
|
||||||
|
cat ${self'.packages.generated-summary-md}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "$ln"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
} < SUMMARY.md.orig > src/SUMMARY.md
|
||||||
|
|
||||||
mkdir -p ./theme
|
mkdir -p ./theme
|
||||||
cp ${self + /modules/dream2nix/core/docs/theme/favicon.png} ./theme/favicon.png
|
cp ${self + /modules/dream2nix/core/docs/theme/favicon.png} ./theme/favicon.png
|
||||||
|
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
# Concepts
|
# Concepts
|
||||||
- [dream2nix modules](./modules.md)
|
- [dream2nix modules](./modules.md)
|
||||||
|
|
||||||
|
# Modules Reference
|
||||||
|
|
||||||
# Development Roundups
|
# Development Roundups
|
||||||
- [April - June 2022](./development-roundups/2022-april-june.md)
|
- [April - June 2022](./development-roundups/2022-april-june.md)
|
||||||
- [July - September 2022](./development-roundups/2022-july-september.md)
|
- [July - September 2022](./development-roundups/2022-july-september.md)
|
||||||
|
@ -41,7 +41,10 @@
|
|||||||
"dream2nix"
|
"dream2nix"
|
||||||
(lib.strings.escapeNixIdentifier name)
|
(lib.strings.escapeNixIdentifier name)
|
||||||
];
|
];
|
||||||
intro = "intro";
|
intro =
|
||||||
|
if lib.pathExists (self + /modules/dream2nix/${name}/README.md)
|
||||||
|
then lib.readFile (self + /modules/dream2nix/${name}/README.md)
|
||||||
|
else "";
|
||||||
baseUrl = "https://github.com/nix-community/dream2nix/blob/master";
|
baseUrl = "https://github.com/nix-community/dream2nix/blob/master";
|
||||||
separateEval = true;
|
separateEval = true;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user