-
-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: split modules into separate pages #873
Conversation
8af267d
to
1f3b46a
Compare
Follow-up tasks once this is merged:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we collapse long categories to avoid scalability issues, similar to NixVim's documentation?
Follow-up tasks once this is merged:
- Support rendering Nix Darwin options
Also the future nixOnDroidModules.stylix
options.
- Support rendering the list of testbeds for each module
That would be neat.
- Improve performance by reducing the number of times we call
pkgs.nixosOptionsDoc
Yes, generating the documentation takes over one minute to build now.
Do you mean collapsing the platforms and modules sections? Or separating NixOS/Home Manager options for each target into sub-pages? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we collapse long categories to avoid scalability issues, similar to NixVim's documentation?
Do you mean collapsing the platforms and modules sections? Or separating NixOS/Home Manager options for each target into sub-pages?
The current section structure looks good. However, potential future sections following the "Modules" section might be hard to spot with such a large "Modules" index. To resolve this, we might want to treat the "Modules" section differently and collapse it in one of the following ways:
-
- Modules - *modules* (collapse)
-
- *Modules* (collapse)
If possible, the second approach seems simpler and better.
56183d3
to
cdfc920
Compare
Due to new module pages being added fairly often, the section numbers won't be stable, so they provide little benefit.
cdfc920
to
2719a5d
Compare
I squashed most of the fixups into the original commits, so this should be suitable to merge with a merge commit to preserve the history. |
This has two benefits: 1. It will be displayed when browsing the module source code on GitHub. 2. It prevents the documentation inadvertently disappearing if the module directory is renamed.
55108dc
to
02f69d4
Compare
I think everything has been addressed, excluding the follow up tasks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, except for some nitpicks.
Feel free to merge after resolving these nitpicks.
Co-authored-by: NAHO <[email protected]>
Co-authored-by: NAHO <[email protected]>
Collapsing is only possible for pages, not headings, so I had to combine platforms and modules into a single section and nest them under draft pages. Later, we could migrate some content from the configuration page to these draft pages to make the flow of the book more natural.
3f99b28
to
1398fc4
Compare
Requested changes have been addressed and another review is not required.
This splits the generated option documentation into an separate page for each module, which makes it easier for users to browse and discover what is supported. Home Manager and NixOS options for each module are shown alongside each other, which makes it easier to notice when a module is available in both.
The current reference pages for Home Manager and NixOS now only show global options such as
stylix.base16Scheme
. The URL for these pages has also changed.This pull request also makes it possible to add hand written documentation about a module, which can be done by creating a file
modules/«module»/README.md
. The file should follow the format: