mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03: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,
|
||||
warningsAreErrors ? true,
|
||||
prefix ? ../../..,
|
||||
checkRedirects ? true,
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -146,7 +147,7 @@ rec {
|
|||
|
||||
nixos-render-docs -j $NIX_BUILD_CORES manual html \
|
||||
--manpage-urls ${manpageUrls} \
|
||||
--redirects ${./redirects.json} \
|
||||
${if checkRedirects then "--redirects ${./redirects.json}" else ""} \
|
||||
--revision ${escapeShellArg revision} \
|
||||
--generator "nixos-render-docs ${pkgs.lib.version}" \
|
||||
--stylesheet style.css \
|
||||
|
|
|
@ -69,6 +69,7 @@ let
|
|||
version = config.system.nixos.release;
|
||||
revision = "release-${version}";
|
||||
extraSources = cfg.nixos.extraModuleSources;
|
||||
checkRedirects = cfg.nixos.checkRedirects;
|
||||
options =
|
||||
let
|
||||
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