generate options docs for clanCore and clanModules
All checks were successful
check / test (pull_request) Successful in 18s
All checks were successful
check / test (pull_request) Successful in 18s
This commit is contained in:
parent
3691764c36
commit
db4b0a2e7d
|
@ -7,6 +7,7 @@
|
|||
lib,
|
||||
pkgs,
|
||||
self',
|
||||
inputs',
|
||||
...
|
||||
}: let
|
||||
build = baseUrl: pkgs.runCommand "website" {
|
||||
|
@ -30,7 +31,7 @@
|
|||
echo "generating page from clan-core: $title"
|
||||
|
||||
# generate header with title, template, weight to make zola happy
|
||||
echo -e "+++\ntitle = \"$title\"\ntemplate = \"docs/page.html\"\nweight = 0+++" > "$targetFile"
|
||||
echo -e "+++\ntitle = \"$title\"\ntemplate = \"docs/page.html\"\nweight = 0\n+++" > "$targetFile"
|
||||
|
||||
# append everything from the file but remove header line starting with '#' and all preceding non-empty lines
|
||||
tail -n +2 "$sourceFile" >> "$targetFile"
|
||||
|
@ -52,6 +53,12 @@
|
|||
done
|
||||
done
|
||||
|
||||
# inject nixos options docs for clanCore
|
||||
cp -r ${inputs'.clan-core.packages.docs-zola-pages-core} content/docs/core-options
|
||||
|
||||
# inject nixos options docs for clanModules
|
||||
cp -r ${inputs'.clan-core.packages.docs-zola-pages-modules} content/docs/modules-options
|
||||
|
||||
zola build
|
||||
cp -r public/* public/.* $out
|
||||
'';
|
||||
|
@ -59,7 +66,8 @@
|
|||
packages.default = self'.packages.website;
|
||||
packages.website = build "https://clan.lol";
|
||||
packages.website-localhost = build "http://localhost:1111";
|
||||
packages.serve = pkgs.writeScriptBin "serve-local" ''
|
||||
packages.serve = pkgs.writeShellScriptBin "serve-local" ''
|
||||
echo "serving: ${self'.packages.website-localhost}"
|
||||
${pkgs.python3}/bin/python -m http.server 1111 \
|
||||
-d ${self'.packages.website-localhost}
|
||||
'';
|
||||
|
|
38
flake.lock
38
flake.lock
|
@ -14,11 +14,11 @@
|
|||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1711323477,
|
||||
"narHash": "sha256-Q5/q5n9TLWaZlrT0e7mX8O25IFbjfhKMJglPfWEL6rU=",
|
||||
"lastModified": 1711863456,
|
||||
"narHash": "sha256-iinLcghfJW4jHjU7w4MjMcNgQGRoX9rrC9GPDM82aaI=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "b07490ca60982ade15338d7c90dc8abc0754f4b7",
|
||||
"revCount": 2326,
|
||||
"rev": "eeb703985e6cf24913cab2ae352937a0b811c5cf",
|
||||
"revCount": 2380,
|
||||
"type": "git",
|
||||
"url": "https://git.clan.lol/clan/clan-core"
|
||||
},
|
||||
|
@ -35,11 +35,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710427903,
|
||||
"narHash": "sha256-sV0Q5ndvfjK9JfCg/QM/HX/fcittohvtq8dD62isxdM=",
|
||||
"lastModified": 1711261295,
|
||||
"narHash": "sha256-5DUNQl9BSmLxgGLbF05G7hi/UTk9DyZq8AuEszhQA7Q=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "21d89b333ca300bef82c928c856d48b94a9f997c",
|
||||
"rev": "5d2d3e421ade554b19b4dbb0d11a04023378a330",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -68,11 +68,11 @@
|
|||
},
|
||||
"nixlib": {
|
||||
"locked": {
|
||||
"lastModified": 1710031547,
|
||||
"narHash": "sha256-pkUg3hOKuGWMGF9WEMPPN/G4pqqdbNGJQ54yhyQYDVY=",
|
||||
"lastModified": 1711241261,
|
||||
"narHash": "sha256-knrTvpl81yGFHIpm1SsLDApe0thFkw1cl3ISAMPmP/0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "630ebdc047ca96d8126e16bb664c7730dc52f6e6",
|
||||
"rev": "b2a1eeef8c185f6bd27432b053ff09d773244cbc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -90,11 +90,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710398463,
|
||||
"narHash": "sha256-fQlYanU84E8uwBpcoTCcLCwU8cqn0eQ7nwTcrWfSngc=",
|
||||
"lastModified": 1711375484,
|
||||
"narHash": "sha256-+d4HqehyQvuHUKR8Nv9HGGd/SP5wjg3MA/hEYJBWQq0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "efd4e38532b5abfaa5c9fc95c5a913157dc20ccb",
|
||||
"rev": "2b3720c7af2271be8cee713cd2f69c5127b0a8e4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -155,11 +155,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710644594,
|
||||
"narHash": "sha256-RquCuzxfy4Nr8DPbdp3D/AsbYep21JgQzG8aMH9jJ4A=",
|
||||
"lastModified": 1711249319,
|
||||
"narHash": "sha256-N+Pp3/8H+rd7cO71VNV/ovV/Kwt+XNeUHNhsmyTabdM=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "83b68a0e8c94b72cdd0a6e547a14ca7eb1c03616",
|
||||
"rev": "405987a66cce9a4a82f321f11b205982a7127c88",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -176,11 +176,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710278050,
|
||||
"narHash": "sha256-Oc6BP7soXqb8itlHI8UKkdf3V9GeJpa1S39SR5+HJys=",
|
||||
"lastModified": 1710781103,
|
||||
"narHash": "sha256-nehQK/XTFxfa6rYKtbi8M1w+IU1v5twYhiyA4dg1vpg=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "35791f76524086ab4b785a33e4abbedfda64bd22",
|
||||
"rev": "7ee5aaac63c30d3c97a8c56efe89f3b2aa9ae564",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
Loading…
Reference in New Issue
Block a user