mirror of
https://gitlab.com/TECHNOFAB/nixlets.git
synced 2026-03-22 10:39:27 +01:00
feat: add support for importing nixlets into each other
This commit is contained in:
parent
c44a5fc995
commit
2c21317f45
6 changed files with 345 additions and 151 deletions
|
|
@ -3,8 +3,22 @@
|
|||
cell,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs) doclib;
|
||||
inherit (inputs) pkgs doclib nixlet-lib;
|
||||
inherit (cell) nixlets;
|
||||
|
||||
optionsDoc = doclib.mkOptionDocs {
|
||||
module = nixlet-lib.nixletModule;
|
||||
roots = [
|
||||
{
|
||||
url = "https://gitlab.com/TECHNOFAB/nixlets/-/blob/main/lib";
|
||||
path = "${inputs.self}/lib";
|
||||
}
|
||||
];
|
||||
};
|
||||
optionsDocs = pkgs.runCommand "options-docs" {} ''
|
||||
mkdir -p $out
|
||||
ln -s ${optionsDoc} $out/options.md
|
||||
'';
|
||||
in
|
||||
(doclib.mkDocs {
|
||||
docs."default" = {
|
||||
|
|
@ -23,9 +37,13 @@ in
|
|||
domains = ["nixlets.projects.tf"];
|
||||
};
|
||||
};
|
||||
macros = {
|
||||
enable = true;
|
||||
includeDir = toString optionsDocs;
|
||||
};
|
||||
dynamic-nav = {
|
||||
enable = true;
|
||||
files."Nixlets Values" = builtins.map (val: {${val.name} = val.mkDocs {};}) (builtins.attrValues nixlets);
|
||||
files."Nixlets Values" = builtins.map (val: {${val.name} = val.mkDocs {fullValues = true;};}) (builtins.attrValues nixlets);
|
||||
};
|
||||
config = {
|
||||
site_name = "Nixlets";
|
||||
|
|
@ -45,6 +63,7 @@ in
|
|||
{"Usage" = "usage.md";}
|
||||
{"Generating Docs" = "generating_docs.md";}
|
||||
{"Secrets" = "secrets.md";}
|
||||
{"Options" = "options.md";}
|
||||
];
|
||||
markdown_extensions = [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue