mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 09:36:20 +09:00
nixos/documentation: add option to disable redirects
Related to issue #https://github.com/NixOS/nixpkgs/issues/412451
This commit is contained in:
parent
3390360529
commit
aeedfab1bf
2 changed files with 11 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
||||||
baseOptionsJSON ? null,
|
baseOptionsJSON ? null,
|
||||||
warningsAreErrors ? true,
|
warningsAreErrors ? true,
|
||||||
prefix ? ../../..,
|
prefix ? ../../..,
|
||||||
|
checkRedirects ? true,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -146,7 +147,7 @@ rec {
|
||||||
|
|
||||||
nixos-render-docs -j $NIX_BUILD_CORES manual html \
|
nixos-render-docs -j $NIX_BUILD_CORES manual html \
|
||||||
--manpage-urls ${manpageUrls} \
|
--manpage-urls ${manpageUrls} \
|
||||||
--redirects ${./redirects.json} \
|
${if checkRedirects then "--redirects ${./redirects.json}" else ""} \
|
||||||
--revision ${escapeShellArg revision} \
|
--revision ${escapeShellArg revision} \
|
||||||
--generator "nixos-render-docs ${pkgs.lib.version}" \
|
--generator "nixos-render-docs ${pkgs.lib.version}" \
|
||||||
--stylesheet style.css \
|
--stylesheet style.css \
|
||||||
|
|
|
@ -69,6 +69,7 @@ let
|
||||||
version = config.system.nixos.release;
|
version = config.system.nixos.release;
|
||||||
revision = "release-${version}";
|
revision = "release-${version}";
|
||||||
extraSources = cfg.nixos.extraModuleSources;
|
extraSources = cfg.nixos.extraModuleSources;
|
||||||
|
checkRedirects = cfg.nixos.checkRedirects;
|
||||||
options =
|
options =
|
||||||
let
|
let
|
||||||
scrubbedEval = evalModules {
|
scrubbedEval = evalModules {
|
||||||
|
@ -353,6 +354,14 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixos.checkRedirects = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
Check redirects for manualHTML.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue