docs: check init htmlproofer

Checks integrity of internal links
post-rendering for problems that might have slipped through
we noticed a set of edge cases where the builtin link checking doesnt work
This commit is contained in:
Johannes Kirschbauer
2025-10-05 13:07:57 +02:00
parent d598e19da4
commit fcfd56c00c

View File

@@ -88,8 +88,12 @@
; ;
}; };
devShells.docs = self'.packages.docs.overrideAttrs (_old: { devShells.docs = self'.packages.docs.overrideAttrs (_old: {
nativeBuildInputs = nativeBuildInputs = [
self'.devShells.default.nativeBuildInputs ++ self'.packages.docs.nativeBuildInputs; # Run: htmlproofer --disable-external
pkgs.html-proofer
]
++ self'.devShells.default.nativeBuildInputs
++ self'.packages.docs.nativeBuildInputs;
shellHook = '' shellHook = ''
${self'.devShells.default.shellHook} ${self'.devShells.default.shellHook}
git_root=$(git rev-parse --show-toplevel) git_root=$(git rev-parse --show-toplevel)
@@ -113,5 +117,17 @@
deploy-docs = pkgs.callPackage ./deploy-docs.nix { inherit (config.packages) docs; }; deploy-docs = pkgs.callPackage ./deploy-docs.nix { inherit (config.packages) docs; };
inherit module-docs; inherit module-docs;
}; };
checks.docs-integrity =
pkgs.runCommand "docs-integrity"
{
nativeBuildInputs = [ pkgs.html-proofer ];
}
''
# External links should be avoided in the docs, because they often break
# and we cannot statically control them. Thus we disable checking them
htmlproofer --disable-external ${self'.packages.docs}
touch $out
'';
}; };
} }