From 77a8b26520f48305f3b1bacffaa8740dde8afa2a Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Sat, 14 Jun 2025 13:53:07 +0100 Subject: [PATCH] doc: update docs on building docs (#1499) --- doc/src/development_environment.md | 10 +++++++--- doc/src/modules.md | 23 +++++++++++++---------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/doc/src/development_environment.md b/doc/src/development_environment.md index ec43ffee..b8cf0ef9 100644 --- a/doc/src/development_environment.md +++ b/doc/src/development_environment.md @@ -61,13 +61,17 @@ This is based on [`nix-fast-build`](https://github.com/Mic92/nix-fast-build#read ## Documentation -The documentation in the `docs` subtree gets +The documentation in the `doc` subtree gets [published](https://nix-community.github.io/stylix) automatically, using GitHub Actions. If you modify it, you can easily build it and check your changes locally: ```sh -nix build .#docs -xdg-open result/index.html +nix run .#doc ``` + +This will build the documentation, start a localhost web-server, and open it in +your browser. + +See also: [Adding modules → Documentation](./modules.md#documentation) diff --git a/doc/src/modules.md b/doc/src/modules.md index d2b21d3a..f885805a 100644 --- a/doc/src/modules.md +++ b/doc/src/modules.md @@ -254,20 +254,23 @@ syntax for formatting and links. For modules needing more general documentation, add a `description` to `modules/«module»/meta.nix`: -You can build and view the documentation by running `nix run .#docs`, or -`serve-docs` from within the dev shell. - -```markdown -# Module Name - -Consider describing which applications are themed by this module (if it's not -obvious from the module name), how the applications need to be installed for the -module to work correctly, which theming items are supported (colors, fonts, -wallpaper, ...), and any caveats the user should be aware of. +```nix +description = '' + Consider describing which applications are themed by this module (if it's not + obvious from the module name), how the applications need to be installed for + the module to work correctly, which theming items are supported (colors, + fonts, wallpaper, ...), and any caveats the user should be aware of. +''; ``` This will be inserted before the automatically generated list of options. +You can build and view the documentation by running `nix run .#doc`, which will +build the documentation, start a localhost web-server, and open it in your +browser. + +See also: [Development environment → Documentation](./development_environment.md#documentation) + ## Testbeds Adding [testbeds](./testbeds.md) for new modules is encouraged, but not