mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
Merge pull request #1179 from teekennedy/master
manualHTML: support --redirects option in nixos-render-docs
This commit is contained in:
commit
c60b5c924c
2 changed files with 11 additions and 0 deletions
|
@ -79,11 +79,17 @@ in rec {
|
|||
'@DARWIN_OPTIONS_JSON@' \
|
||||
${optionsJSON}/share/doc/darwin/options.json
|
||||
|
||||
# Pass --redirects option if nixos-render-docs supports it
|
||||
if nixos-render-docs manual html --help | grep --silent -E '^\s+--redirects\s'; then
|
||||
redirects_opt="--redirects ${./redirects.json}"
|
||||
fi
|
||||
|
||||
# TODO: --manpage-urls?
|
||||
nixos-render-docs -j $NIX_BUILD_CORES manual html \
|
||||
--manpage-urls ${pkgs.writeText "manpage-urls.json" "{}"} \
|
||||
--revision ${lib.escapeShellArg revision} \
|
||||
--generator "nixos-render-docs ${lib.version}" \
|
||||
$redirects_opt \
|
||||
--stylesheet style.css \
|
||||
--stylesheet highlightjs/mono-blue.css \
|
||||
--script ./highlightjs/highlight.pack.js \
|
||||
|
|
5
doc/manual/redirects.json
Normal file
5
doc/manual/redirects.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"book-darwin-manual": [
|
||||
"index.html#book-darwin-manual"
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue