doc: update docs on building docs (#1499)

This commit is contained in:
Matt Sturgeon 2025-06-14 13:53:07 +01:00 committed by GitHub
parent 751d6c5df0
commit 77a8b26520
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 13 deletions

View file

@ -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)

View file

@ -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