mirror of
https://gitlab.com/TECHNOFAB/nixlets.git
synced 2025-12-11 01:20:06 +01:00
docs: update nixmkdocs and small improvements
This commit is contained in:
parent
60c71a53d4
commit
6af83809f7
6 changed files with 37 additions and 58 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB |
1
docs/images/logo.svg
Normal file
1
docs/images/logo.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 5.4 KiB |
15
docs/style.css
Normal file
15
docs/style.css
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
.md-header__button.md-logo {
|
||||
margin: 0;
|
||||
padding-top: .2rem;
|
||||
padding-bottom: .2rem;
|
||||
}
|
||||
|
||||
[dir="ltr"] .md-header__title {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.md-header__button.md-logo img,
|
||||
.md-header__button.md-logo svg {
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -290,11 +290,11 @@
|
|||
"nix-mkdocs": {
|
||||
"locked": {
|
||||
"dir": "lib",
|
||||
"lastModified": 1745501687,
|
||||
"narHash": "sha256-v0BE519o4zjZ8I7ZULjjIIj7HG5NPFo9JCO0HqyiEec=",
|
||||
"lastModified": 1757055638,
|
||||
"narHash": "sha256-KHYSkEreFe4meXzSdEbknC/HwaQSNClQkc8vzHlAsMM=",
|
||||
"owner": "TECHNOFAB",
|
||||
"repo": "nixmkdocs",
|
||||
"rev": "6c4bff339003ab0197a6dda96eea847996f21a63",
|
||||
"rev": "7840a5febdbeaf2da90babf6c94b3d0929d2bf74",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
73
flake.nix
73
flake.nix
|
|
@ -58,11 +58,9 @@
|
|||
};
|
||||
};
|
||||
|
||||
doc = {
|
||||
docs."default".config = {
|
||||
path = ./docs;
|
||||
deps = pp: [
|
||||
pp.mkdocs-material
|
||||
(pp.callPackage inputs.mkdocs-material-umami {})
|
||||
(pp.buildPythonPackage rec {
|
||||
pname = "mkdocs-gen-files";
|
||||
version = "0.5.0";
|
||||
|
|
@ -77,43 +75,31 @@
|
|||
dependencies = [pp.mkdocs];
|
||||
})
|
||||
];
|
||||
material = {
|
||||
enable = true;
|
||||
colors = {
|
||||
primary = "blue";
|
||||
accent = "light blue";
|
||||
};
|
||||
umami = {
|
||||
enable = true;
|
||||
src = "https://analytics.tf/umami";
|
||||
siteId = "a4181010-317a-45e3-978c-5d07a93e0cd2";
|
||||
domains = ["nixlets.projects.tf"];
|
||||
};
|
||||
};
|
||||
config = {
|
||||
site_name = "Nixlets";
|
||||
site_url = "https://nixlets.projects.tf";
|
||||
repo_name = "TECHNOFAB/nixlets";
|
||||
repo_url = "https://gitlab.com/TECHNOFAB/nixlets";
|
||||
edit_uri = "edit/main/docs/";
|
||||
extra_css = ["style.css"];
|
||||
theme = {
|
||||
name = "material";
|
||||
features = ["content.code.copy" "content.action.edit"];
|
||||
icon.repo = "simple/gitlab";
|
||||
logo = "images/logo.png";
|
||||
favicon = "images/favicon.png";
|
||||
palette = [
|
||||
{
|
||||
scheme = "default";
|
||||
media = "(prefers-color-scheme: light)";
|
||||
primary = "blue";
|
||||
accent = "light blue";
|
||||
toggle = {
|
||||
icon = "material/brightness-7";
|
||||
name = "Switch to dark mode";
|
||||
};
|
||||
}
|
||||
{
|
||||
scheme = "slate";
|
||||
media = "(prefers-color-scheme: dark)";
|
||||
primary = "blue";
|
||||
accent = "light blue";
|
||||
toggle = {
|
||||
icon = "material/brightness-4";
|
||||
name = "Switch to light mode";
|
||||
};
|
||||
}
|
||||
];
|
||||
logo = "images/logo.svg";
|
||||
favicon = "images/logo.svg";
|
||||
};
|
||||
plugins = [
|
||||
"search"
|
||||
"material-umami"
|
||||
{
|
||||
# bit hacky, but works :D
|
||||
"gen-files".scripts = let
|
||||
|
|
@ -157,29 +143,6 @@
|
|||
"fenced_code"
|
||||
"admonition"
|
||||
];
|
||||
extra.analytics = {
|
||||
provider = "umami";
|
||||
site_id = "a4181010-317a-45e3-978c-5d07a93e0cd2";
|
||||
src = "https://analytics.tf/umami";
|
||||
domains = "nixlets.projects.tf";
|
||||
feedback = {
|
||||
title = "Was this page helpful?";
|
||||
ratings = [
|
||||
{
|
||||
icon = "material/thumb-up-outline";
|
||||
name = "This page is helpful";
|
||||
data = "good";
|
||||
note = "Thanks for your feedback!";
|
||||
}
|
||||
{
|
||||
icon = "material/thumb-down-outline";
|
||||
name = "This page could be improved";
|
||||
data = "bad";
|
||||
note = "Thanks for your feedback!";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue