Skip to content

Commit 0503a86

Browse files
authored
Merge pull request #14268 from roberth/dev-doc-manual
doc/dev/doc: Update local build instructions for manual
2 parents 721f557 + 61cb9c4 commit 0503a86

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

doc/manual/source/development/documentation.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,31 @@ nix build .#nix-manual
2525
and open `./result/share/doc/nix/manual/index.html`.
2626

2727

28-
To build the manual incrementally, [enter the development shell](./building.md) and run:
28+
To build the manual incrementally, [enter the development shell](./building.md) and configure with `doc-gen` enabled:
29+
30+
**If using interactive `nix develop`:**
2931

3032
```console
31-
make manual-html-open -j $NIX_BUILD_CORES
33+
$ nix develop
34+
$ mesonFlags="$mesonFlags -Ddoc-gen=true" mesonConfigurePhase
3235
```
3336

34-
In order to reflect changes to the [Makefile for the manual], clear all generated files before re-building:
37+
**If using direnv:**
3538

36-
[Makefile for the manual]: https://github.com/NixOS/nix/blob/master/doc/manual/local.mk
39+
```console
40+
$ direnv allow
41+
$ bash -c 'source $stdenv/setup && mesonFlags="$mesonFlags -Ddoc-gen=true" mesonConfigurePhase'
42+
```
43+
44+
Then build the manual:
3745

3846
```console
39-
rm $(git ls-files doc/manual/ -o | grep -F '.md') && rmdir doc/manual/source/command-ref/new-cli && make manual-html -j $NIX_BUILD_CORES
47+
$ cd build
48+
$ meson compile manual
4049
```
4150

51+
The HTML manual will be generated at `build/src/nix-manual/manual/index.html`.
52+
4253
## Style guide
4354

4455
The goal of this style guide is to make it such that

0 commit comments

Comments
 (0)