Commit 5b8a7149 authored by GetPsyched's avatar GetPsyched Committed by Valentin Gagarin
Browse files

nixos-render-docs: init redirects system

parent 8809585e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -105,6 +105,11 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @NixOS/nix-team @raitobeza
/nixos/modules/system/activation/bootspec.nix         @grahamc @cole-h @raitobezarius
/nixos/modules/system/activation/bootspec.cue         @grahamc @cole-h @raitobezarius

# NixOS Render Docs
/pkgs/by-name/ni/nixos-render-docs @fricklerhandwerk @GetPsyched @hsjobeki
/doc/redirects.json                @fricklerhandwerk @GetPsyched @hsjobeki
/nixos/doc/manual/redirects.json   @fricklerhandwerk @GetPsyched @hsjobeki

# NixOS integration test driver
/nixos/lib/test-driver  @tfc

+7 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ Rendered documentation:
- [Unstable (from master)](https://nixos.org/manual/nixpkgs/unstable/)
- [Stable (from latest release)](https://nixos.org/manual/nixpkgs/stable/)

The rendering tool is [nixos-render-docs](../pkgs/by-name/ni/nixos-render-docs/src/nixos_render_docs), sometimes abbreviated `nrd`.
The rendering tool is [nixos-render-docs](../pkgs/by-name/ni/nixos-render-docs), sometimes abbreviated `nrd`.

## Contributing to this documentation

@@ -42,6 +42,12 @@ It is a daemon, that:
2. HTTP serves the manual, injecting a script that triggers reload on changes
3. opens the manual in the default browser

### Testing redirects

Once you have a successful build, you can open the relevant HTML (path mentioned above) in a browser along with the anchor, and observe the redirection.

Note that if you already loaded the page and *then* input the anchor, you will need to perform a reload. This is because browsers do not re-run client JS code when only the anchor has changed.

## Syntax

As per [RFC 0072](https://github.com/NixOS/rfcs/pull/72), all new documentation content should be written in [CommonMark](https://commonmark.org/) Markdown dialect.
+2 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ stdenvNoCC.mkDerivation (
        ../anchor-use.js
        ../anchor.min.js
        ../manpage-urls.json
        ../redirects.json
      ];
    };

@@ -62,6 +63,7 @@ stdenvNoCC.mkDerivation (

      nixos-render-docs manual html \
        --manpage-urls ./manpage-urls.json \
        --redirects ./redirects.json \
        --revision ${nixpkgs.rev or "master"} \
        --stylesheet style.css \
        --stylesheet highlightjs/mono-blue.css \

doc/redirects.json

0 → 100644
+4190 −0

File added.

Preview size limit exceeded, changes collapsed.

+6 −0
Original line number Diff line number Diff line
@@ -17,6 +17,12 @@ There's also [a convenient development daemon](https://nixos.org/manual/nixpkgs/

The above instructions don't deal with the appendix of available `configuration.nix` options, and the manual pages related to NixOS. These are built, and written in a different location and in a different format, as explained in the next sections.

## Testing redirects {#sec-contributing-redirects}

Once you have a successful build, you can open the relevant HTML (path mentioned above) in a browser along with the anchor, and observe the redirection.

Note that if you already loaded the page and *then* input the anchor, you will need to perform a reload. This is because browsers do not re-run client JS code when only the anchor has changed.

## Contributing to the `configuration.nix` options documentation {#sec-contributing-options}

The documentation for all the different `configuration.nix` options is automatically generated by reading the `description`s of all the NixOS options defined at `nixos/modules/`. If you want to improve such `description`, find it in the `nixos/modules/` directory, and edit it and open a pull request.
Loading