1# Contributing to this manual {#chap-contributing}
2
3The [DocBook] and CommonMark sources of the NixOS manual are in the [nixos/doc/manual](https://github.com/NixOS/nixpkgs/tree/master/nixos/doc/manual) subdirectory of the [Nixpkgs](https://github.com/NixOS/nixpkgs) repository.
4
5You can quickly check your edits with the following:
6
7```ShellSession
8$ cd /path/to/nixpkgs
9$ nix-build nixos/release.nix -A manual.x86_64-linux
10```
11
12If the build succeeds, the manual will be in `./result/share/doc/nixos/index.html`.
13
14**Contributing to the man pages**
15
16The man pages are written in [DocBook] which is XML.
17
18To see what your edits look like:
19
20```ShellSession
21$ cd /path/to/nixpkgs
22$ nix-build nixos/release.nix -A manpages.x86_64-linux
23```
24
25You can then read the man page you edited by running
26
27```ShellSession
28$ man --manpath=result/share/man nixos-rebuild # Replace nixos-rebuild with the command whose manual you edited
29```
30
31If you're on a different architecture that's supported by NixOS (check nixos/release.nix) then replace `x86_64-linux` with the architecture.
32`nix-build` will complain otherwise, but should also tell you which architecture you have + the supported ones.
33
34[DocBook]: https://en.wikipedia.org/wiki/DocBook