mirror of
https://gitlab.com/rensa-nix/devshell.git
synced 2025-12-11 22:00:08 +01:00
chore: add initial nixmkdocs setup and improve documentation
This commit is contained in:
parent
e76bef387e
commit
695d36a457
11 changed files with 172 additions and 8 deletions
68
.nix/repo/docs.nix
Normal file
68
.nix/repo/docs.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{inputs, ...}: let
|
||||
inherit (inputs) pkgs devshell doclib;
|
||||
|
||||
roots = [
|
||||
{
|
||||
url = "https://gitlab.com/rensa-nix/devshell/-/blob/main/lib";
|
||||
path = "${inputs.self}/lib";
|
||||
}
|
||||
];
|
||||
optionsDoc = doclib.mkOptionDocs {
|
||||
module = devshell.modules;
|
||||
inherit roots;
|
||||
};
|
||||
optionsDocs = pkgs.runCommand "options-docs" {} ''
|
||||
mkdir -p $out
|
||||
ln -s ${optionsDoc} $out/options.md
|
||||
'';
|
||||
in
|
||||
(doclib.mkDocs {
|
||||
docs."default" = {
|
||||
base = "${inputs.self}";
|
||||
path = "${inputs.self}/docs";
|
||||
material = {
|
||||
enable = true;
|
||||
colors = {
|
||||
primary = "aqua";
|
||||
accent = "blue";
|
||||
};
|
||||
umami = {
|
||||
enable = false;
|
||||
src = "https://analytics.tf/umami";
|
||||
siteId = "";
|
||||
domains = ["devshell.rensa.projects.tf"];
|
||||
};
|
||||
};
|
||||
macros = {
|
||||
enable = true;
|
||||
includeDir = toString optionsDocs;
|
||||
};
|
||||
config = {
|
||||
site_name = "Devshell";
|
||||
repo_name = "rensa-nix/devshell";
|
||||
repo_url = "https://gitlab.com/rensa-nix/devshell";
|
||||
theme = {
|
||||
logo = "images/logo.png";
|
||||
icon.repo = "simple/gitlab";
|
||||
favicon = "images/favicon.png";
|
||||
};
|
||||
nav = [
|
||||
{"Introduction" = "index.md";}
|
||||
{"Options" = "options.md";}
|
||||
];
|
||||
markdown_extensions = [
|
||||
{
|
||||
"pymdownx.highlight".pygments_lang_class = true;
|
||||
}
|
||||
"pymdownx.inlinehilite"
|
||||
"pymdownx.snippets"
|
||||
"pymdownx.superfences"
|
||||
"pymdownx.escapeall"
|
||||
"fenced_code"
|
||||
];
|
||||
};
|
||||
};
|
||||
}).packages
|
||||
// {
|
||||
inherit optionsDocs;
|
||||
}
|
||||
34
.nix/repo/flake.lock
generated
34
.nix/repo/flake.lock
generated
|
|
@ -1,5 +1,37 @@
|
|||
{
|
||||
"nodes": {
|
||||
"mkdocs-material-umami": {
|
||||
"locked": {
|
||||
"lastModified": 1745840856,
|
||||
"narHash": "sha256-1Ad1JTMQMP6YsoIKAA+SBCE15qWrYkGue9/lXOLnu9I=",
|
||||
"owner": "technofab",
|
||||
"repo": "mkdocs-material-umami",
|
||||
"rev": "3ac9b194450f6b779c37b8d16fec640198e5cd0a",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "technofab",
|
||||
"repo": "mkdocs-material-umami",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"nixmkdocs": {
|
||||
"locked": {
|
||||
"dir": "lib",
|
||||
"lastModified": 1755783537,
|
||||
"narHash": "sha256-78lWSC3UzkpWYsnyncqbrE37gEIWLzejOeDyoBb6h5o=",
|
||||
"owner": "TECHNOFAB",
|
||||
"repo": "nixmkdocs",
|
||||
"rev": "4fd5a351c54e005c4e8df7e23a8e4eec9d3b8cd1",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"dir": "lib",
|
||||
"owner": "TECHNOFAB",
|
||||
"repo": "nixmkdocs",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"nixtest-lib": {
|
||||
"locked": {
|
||||
"dir": "lib",
|
||||
|
|
@ -19,6 +51,8 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"mkdocs-material-umami": "mkdocs-material-umami",
|
||||
"nixmkdocs": "nixmkdocs",
|
||||
"nixtest-lib": "nixtest-lib"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,17 @@
|
|||
{
|
||||
inputs = {
|
||||
nixtest-lib.url = "gitlab:TECHNOFAB/nixtest?dir=lib";
|
||||
nixmkdocs.url = "gitlab:TECHNOFAB/nixmkdocs?dir=lib";
|
||||
mkdocs-material-umami.url = "gitlab:technofab/mkdocs-material-umami";
|
||||
};
|
||||
outputs = i:
|
||||
i
|
||||
// {
|
||||
ntlib = i.nixtest-lib.lib {inherit (i.parent) pkgs;};
|
||||
doclib = i.nixmkdocs.lib {
|
||||
inherit (i.parent) pkgs;
|
||||
inherit (i.parent.pkgs) lib;
|
||||
};
|
||||
devshell = import "${i.parent.self}/lib" {inherit (i.parent) pkgs;};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue