1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-08 18:11:02 +01:00

Remove _redirects from link checking for now

Since it is apparently not deployed correctly on nix.dev, we can't
meaningfully work with it now.
This commit is contained in:
Robert Hensing 2025-12-05 02:10:54 +01:00
parent ee30827e20
commit d5099279f8

View file

@ -12,10 +12,7 @@ stdenv.mkDerivation {
src = lib.fileset.toSource { src = lib.fileset.toSource {
root = ./.; root = ./.;
fileset = lib.fileset.unions [ fileset = ./redirects.json;
./source/_redirects
./redirects.json
];
}; };
nativeBuildInputs = [ jq ]; nativeBuildInputs = [ jq ];
@ -29,22 +26,6 @@ stdenv.mkDerivation {
echo '<h1>Redirect Targets to Check</h1>' echo '<h1>Redirect Targets to Check</h1>'
echo '<p>This document contains all redirect targets from the Nix manual.</p>' echo '<p>This document contains all redirect targets from the Nix manual.</p>'
echo '<h2>Server-side redirects (from _redirects)</h2>'
echo '<ul>'
# Extract targets from _redirects file (second field, skip comments and empty lines)
grep -v '^#' source/_redirects | grep -v '^$' | while read -r source target code; do
# Handle splat patterns by converting to a concrete example
if [[ "$target" == *":splat"* ]]; then
target="''${target//:splat/example}"
fi
# Remove leading slash for relative path
target="''${target#/}"
echo "<li><a href=\"$target\">$target</a> (from $source)</li>"
done
echo '</ul>'
echo '<h2>Client-side redirects (from redirects.json)</h2>' echo '<h2>Client-side redirects (from redirects.json)</h2>'
echo '<ul>' echo '<ul>'