diff options
Diffstat (limited to 'nixpkgs/doc/contributing/contributing-to-documentation.chapter.md')
-rw-r--r-- | nixpkgs/doc/contributing/contributing-to-documentation.chapter.md | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/nixpkgs/doc/contributing/contributing-to-documentation.chapter.md b/nixpkgs/doc/contributing/contributing-to-documentation.chapter.md index a732eee4b962..557473555f8a 100644 --- a/nixpkgs/doc/contributing/contributing-to-documentation.chapter.md +++ b/nixpkgs/doc/contributing/contributing-to-documentation.chapter.md @@ -1,27 +1,23 @@ # Contributing to this documentation {#chap-contributing} -The sources of the Nixpkgs manual are in the [doc](https://github.com/NixOS/nixpkgs/tree/master/doc) subdirectory of the Nixpkgs repository. The manual is still partially written in DocBook but it is progressively being converted to [Markdown](#sec-contributing-markup). +The sources of the Nixpkgs manual are in the [doc](https://github.com/NixOS/nixpkgs/tree/master/doc) subdirectory of the Nixpkgs repository. -You can quickly check your edits with `make`: +You can quickly check your edits with `nix-build`: ```ShellSession -$ cd /path/to/nixpkgs/doc -$ nix-shell -[nix-shell]$ make +$ cd /path/to/nixpkgs +$ nix-build doc ``` -If you experience problems, run `make debug` to help understand the docbook errors. - -After making modifications to the manual, it's important to build it before committing. You can do that as follows: +If the build succeeds, the manual will be in `./result/share/doc/nixpkgs/manual.html`. -```ShellSession -$ cd /path/to/nixpkgs/doc -$ nix-shell -[nix-shell]$ make clean -[nix-shell]$ nix-build . -``` +## devmode {#sec-contributing-devmode} -If the build succeeds, the manual will be in `./result/share/doc/nixpkgs/manual.html`. +The shell in the manual source directory makes available a command, `devmode`. +It is a daemon, that: +1. watches the manual's source for changes and when they occur — rebuilds +2. HTTP serves the manual, injecting a script that triggers reload on changes +3. opens the manual in the default browser ## Syntax {#sec-contributing-markup} @@ -114,5 +110,3 @@ Additional syntax extensions are available, all of which can be used in NixOS op > > watermelon > : green fruit with red flesh - -For contributing to the legacy parts, please see [DocBook: The Definitive Guide](https://tdg.docbook.org/) or the [DocBook rocks! primer](https://web.archive.org/web/20200816233747/https://docbook.rocks/). |