mirror of
https://gitlab.com/TECHNOFAB/coder-templates.git
synced 2025-12-11 17:50:06 +01:00
81 lines
2.3 KiB
Nix
81 lines
2.3 KiB
Nix
|
|
{inputs, ...}: let
|
||
|
|
inherit (inputs) cells doclib pkgs;
|
||
|
|
inherit (pkgs.lib) concatMapStringsSep;
|
||
|
|
in
|
||
|
|
(doclib.mkDocs {
|
||
|
|
docs."default" = {
|
||
|
|
base = "${inputs.self}";
|
||
|
|
path = "${inputs.self}/docs";
|
||
|
|
material = {
|
||
|
|
enable = true;
|
||
|
|
colors = {
|
||
|
|
primary = "green";
|
||
|
|
accent = "light blue";
|
||
|
|
};
|
||
|
|
umami = {
|
||
|
|
enable = true;
|
||
|
|
src = "https://analytics.tf/umami";
|
||
|
|
siteId = "dc8d1f6c-50f6-4019-9b0d-9b924dedb111";
|
||
|
|
domains = ["coder-templates.projects.tf"];
|
||
|
|
};
|
||
|
|
};
|
||
|
|
dynamic-nav = {
|
||
|
|
enable = true;
|
||
|
|
files."Parameters" = map (template: {
|
||
|
|
${template} =
|
||
|
|
builtins.toFile "${template}.md"
|
||
|
|
# md
|
||
|
|
''
|
||
|
|
# ${template} Parameters
|
||
|
|
|
||
|
|
${
|
||
|
|
concatMapStringsSep "\n" (param: ''
|
||
|
|
## ${param.name}
|
||
|
|
|
||
|
|
${param.description}
|
||
|
|
|
||
|
|
Type: `${param.type}` <br>
|
||
|
|
Mutable: `${
|
||
|
|
if param.mutable
|
||
|
|
then "true"
|
||
|
|
else "false"
|
||
|
|
}` <br>
|
||
|
|
${
|
||
|
|
if param.default != ""
|
||
|
|
then "Default: `${param.default}` <br>"
|
||
|
|
else ""
|
||
|
|
}
|
||
|
|
'')
|
||
|
|
(builtins.attrValues cells.packages.packages."${template}-cli".module.config.data.coder_parameter)
|
||
|
|
}
|
||
|
|
'';
|
||
|
|
}) ["nix-kubernetes"];
|
||
|
|
};
|
||
|
|
config = {
|
||
|
|
site_name = "Coder Templates";
|
||
|
|
site_url = "https://coder-templates.projects.tf";
|
||
|
|
repo_name = "TECHNOFAB/coder-templates";
|
||
|
|
repo_url = "https://gitlab.com/TECHNOFAB/coder-templates";
|
||
|
|
extra_css = ["style.css"];
|
||
|
|
theme = {
|
||
|
|
logo = "images/logo.svg";
|
||
|
|
icon.repo = "simple/gitlab";
|
||
|
|
favicon = "images/logo.svg";
|
||
|
|
};
|
||
|
|
nav = [
|
||
|
|
{"Introduction" = "index.md";}
|
||
|
|
];
|
||
|
|
markdown_extensions = [
|
||
|
|
{
|
||
|
|
"pymdownx.highlight".pygments_lang_class = true;
|
||
|
|
}
|
||
|
|
"pymdownx.inlinehilite"
|
||
|
|
"pymdownx.snippets"
|
||
|
|
"pymdownx.superfences"
|
||
|
|
"pymdownx.escapeall"
|
||
|
|
"fenced_code"
|
||
|
|
];
|
||
|
|
};
|
||
|
|
};
|
||
|
|
}).packages
|