mirror of
https://github.com/nix-dot-dev/nix.dev.git
synced 2024-10-05 17:47:29 +03:00
offer the Nix manual as a single page again (#997)
This commit is contained in:
parent
6cdcc8d14f
commit
c2be69105c
@ -49,6 +49,10 @@ let
|
|||||||
if [[ -f ${nix.doc}/share/doc/nix/manual/_redirects ]]; then
|
if [[ -f ${nix.doc}/share/doc/nix/manual/_redirects ]]; then
|
||||||
sed '/^#/d;/^$/d;s#^\(.*\) \(.*\) #/manual/nix/${version}\1 /manual/nix/${version}\2 #g' ${nix.doc}/share/doc/nix/manual/_redirects >> $out/_redirects
|
sed '/^#/d;/^$/d;s#^\(.*\) \(.*\) #/manual/nix/${version}\1 /manual/nix/${version}\2 #g' ${nix.doc}/share/doc/nix/manual/_redirects >> $out/_redirects
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# provide a single-page view from mdBook's print feature.
|
||||||
|
# this is hacky but cheap and does work.
|
||||||
|
sed -z 's|\s*window\.addEventListener(\x27load\x27, function() {\s*window\.setTimeout(window.print, 100);\s*});||g' ${nix.doc}/share/doc/nix/manual/print.html > $out/manual/nix/${version}/nix-${version}.html
|
||||||
'';
|
'';
|
||||||
# Redirects from mutable URLs like /manual/nix/latest/... to /manual/nix/2.21/...
|
# Redirects from mutable URLs like /manual/nix/latest/... to /manual/nix/2.21/...
|
||||||
mutableRedirect = mutable: immutable: ''
|
mutableRedirect = mutable: immutable: ''
|
||||||
|
@ -30,19 +30,19 @@ The Nix reference manual is available for multiple versions:
|
|||||||
|
|
||||||
Development build from the `master` branch of the [Nix repository](https://github.com/NixOS/nix)
|
Development build from the `master` branch of the [Nix repository](https://github.com/NixOS/nix)
|
||||||
|
|
||||||
- [Nix @nix-latest@](https://nix.dev/manual/nix/latest/)
|
- [Nix @nix-latest@](https://nix.dev/manual/nix/latest/) ([single page](https://nix.dev/manual/nix/latest/nix-@nix-latest@.html))
|
||||||
|
|
||||||
Latest Nix release
|
Latest Nix release
|
||||||
|
|
||||||
- [Nix @nix-rolling@](https://nix.dev/manual/nix/rolling/)
|
- [Nix @nix-rolling@](https://nix.dev/manual/nix/rolling/) ([single page](https://nix.dev/manual/nix/latest/nix-@nix-rolling@.html))
|
||||||
|
|
||||||
Shipped with the rolling release of {term}`Nixpkgs` and {term}`NixOS`
|
Shipped with the rolling release of {term}`Nixpkgs` and {term}`NixOS`
|
||||||
|
|
||||||
- [Nix @nix-stable@](https://nix.dev/manual/nix/stable/)
|
- [Nix @nix-stable@](https://nix.dev/manual/nix/stable/) ([single page](https://nix.dev/manual/nix/latest/nix-@nix-stable@.html))
|
||||||
|
|
||||||
Shipped with the latest stable release of {term}`Nixpkgs` and {term}`NixOS`: @nixpkgs-stable@
|
Shipped with the current stable release of {term}`Nixpkgs` and {term}`NixOS`: @nixpkgs-stable@
|
||||||
|
|
||||||
- [Nix @nix-prev-stable@](https://nix.dev/manual/nix/prev-stable/)
|
- [Nix @nix-prev-stable@](https://nix.dev/manual/nix/prev-stable/) ([single page](https://nix.dev/manual/nix/latest/nix-@nix-prev-stable@.html))
|
||||||
|
|
||||||
Shipped with the previous stable release of {term}`Nixpkgs` and {term}`NixOS`: @nixpkgs-prev-stable@
|
Shipped with the previous stable release of {term}`Nixpkgs` and {term}`NixOS`: @nixpkgs-prev-stable@
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user