docs: refactor

This commit is contained in:
zowoq 2025-01-18 10:09:22 +10:00
parent 0d28f2b671
commit f83732c8cc
2 changed files with 34 additions and 31 deletions

View file

@ -1,35 +1,38 @@
{ config, pkgs, ... }:
{
devShells.mkdocs = pkgs.mkShellNoCC { inputsFrom = [ config.packages.docs ]; };
packages = {
docs =
pkgs.runCommand "docs"
{
buildInputs = [
pkgs.python3.pkgs.mkdocs-material
pkgs.python3.pkgs.mkdocs-material.optional-dependencies.recommended
];
files = pkgs.lib.fileset.toSource {
root = ../.;
fileset = pkgs.lib.fileset.unions [
../docs
../mkdocs.yml
];
perSystem =
{ config, pkgs, ... }:
{
devShells.mkdocs = pkgs.mkShellNoCC { inputsFrom = [ config.packages.docs ]; };
packages = {
docs =
pkgs.runCommand "docs"
{
buildInputs = [
pkgs.python3.pkgs.mkdocs-material
pkgs.python3.pkgs.mkdocs-material.optional-dependencies.recommended
];
files = pkgs.lib.fileset.toSource {
root = ../.;
fileset = pkgs.lib.fileset.unions [
../docs
../mkdocs.yml
];
};
}
''
cd $files
mkdocs build --strict --site-dir $out
'';
docs-linkcheck = pkgs.testers.lycheeLinkCheck rec {
extraConfig = {
include_mail = true;
include_verbatim = true;
};
}
''
cd $files
mkdocs build --strict --site-dir $out
'';
docs-linkcheck = pkgs.testers.lycheeLinkCheck rec {
extraConfig = {
include_mail = true;
include_verbatim = true;
remap = {
"https://nix-community.org" = site;
};
site = config.packages.docs;
};
};
remap = {
"https://nix-community.org" = site;
};
site = config.packages.docs;
};
};
}

View file

@ -54,6 +54,7 @@
systems = import inputs.systems;
imports = [
./dev/docs.nix
./dev/effect-deploy.nix
./modules
inputs.hercules-ci-effects.flakeModule
@ -107,7 +108,6 @@
}:
{
imports = [
./dev/docs.nix
./dev/shell.nix
./terraform/shell.nix
];