diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/contributing/contributing-to-documentation.chapter.md | 8 | ||||
-rw-r--r-- | doc/shell.nix | 20 |
2 files changed, 28 insertions, 0 deletions
diff --git a/doc/contributing/contributing-to-documentation.chapter.md b/doc/contributing/contributing-to-documentation.chapter.md index a732eee4b962..0b7b49bf7dda 100644 --- a/doc/contributing/contributing-to-documentation.chapter.md +++ b/doc/contributing/contributing-to-documentation.chapter.md @@ -23,6 +23,14 @@ $ nix-shell If the build succeeds, the manual will be in `./result/share/doc/nixpkgs/manual.html`. +## devmode {#sec-contributing-devmode} + +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} 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. diff --git a/doc/shell.nix b/doc/shell.nix new file mode 100644 index 000000000000..d71e3f3a709a --- /dev/null +++ b/doc/shell.nix @@ -0,0 +1,20 @@ +let + pkgs = import ../. { + config = {}; + overlays = []; + }; + + common = import ./common.nix; + inherit (common) outputPath indexPath; + + web-devmode = import ../pkgs/tools/nix/web-devmode.nix { + inherit pkgs; + buildArgs = "./."; + open = "/${outputPath}/${indexPath}"; + }; +in + pkgs.mkShell { + packages = [ + web-devmode + ]; + } |