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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue