mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
Merge pull request #14268 from roberth/dev-doc-manual
doc/dev/doc: Update local build instructions for manual
This commit is contained in:
commit
0503a862ef
1 changed files with 17 additions and 6 deletions
|
|
@ -25,20 +25,31 @@ nix build .#nix-manual
|
||||||
and open `./result/share/doc/nix/manual/index.html`.
|
and open `./result/share/doc/nix/manual/index.html`.
|
||||||
|
|
||||||
|
|
||||||
To build the manual incrementally, [enter the development shell](./building.md) and run:
|
To build the manual incrementally, [enter the development shell](./building.md) and configure with `doc-gen` enabled:
|
||||||
|
|
||||||
|
**If using interactive `nix develop`:**
|
||||||
|
|
||||||
```console
|
```console
|
||||||
make manual-html-open -j $NIX_BUILD_CORES
|
$ nix develop
|
||||||
|
$ mesonFlags="$mesonFlags -Ddoc-gen=true" mesonConfigurePhase
|
||||||
```
|
```
|
||||||
|
|
||||||
In order to reflect changes to the [Makefile for the manual], clear all generated files before re-building:
|
**If using direnv:**
|
||||||
|
|
||||||
[Makefile for the manual]: https://github.com/NixOS/nix/blob/master/doc/manual/local.mk
|
|
||||||
|
|
||||||
```console
|
```console
|
||||||
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
|
$ direnv allow
|
||||||
|
$ bash -c 'source $stdenv/setup && mesonFlags="$mesonFlags -Ddoc-gen=true" mesonConfigurePhase'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Then build the manual:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ cd build
|
||||||
|
$ meson compile manual
|
||||||
|
```
|
||||||
|
|
||||||
|
The HTML manual will be generated at `build/src/nix-manual/manual/index.html`.
|
||||||
|
|
||||||
## Style guide
|
## Style guide
|
||||||
|
|
||||||
The goal of this style guide is to make it such that
|
The goal of this style guide is to make it such that
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue