doc: collapse platforms and modules
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.
This commit is contained in:
parent
99096ef3e3
commit
2b2f260a69
5 changed files with 17 additions and 10 deletions
|
|
@ -9,3 +9,6 @@ site-url = "/stylix/"
|
|||
git-repository-url = "https://github.com/danth/stylix"
|
||||
edit-url-template = "https://github.com/danth/stylix/edit/master/docs/{path}"
|
||||
no-section-label = true
|
||||
|
||||
[output.html.fold]
|
||||
enable = true
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ let
|
|||
}).optionsCommonMark;
|
||||
|
||||
# The documentation for options which aren't linked to a specific module
|
||||
makeGlobalOptionsDoc =
|
||||
makePlatformsOptionsDoc =
|
||||
configuration:
|
||||
makeOptionsDoc {
|
||||
inherit configuration;
|
||||
|
|
@ -159,9 +159,9 @@ pkgs.stdenvNoCC.mkDerivation {
|
|||
cp ${../gnome.png} src/gnome.png
|
||||
cp ${../kde.png} src/kde.png
|
||||
|
||||
mkdir --parents src/options/global
|
||||
writeOptions 'Home Manager' ${(makeGlobalOptionsDoc homeManagerConfiguration)} src/options/global/home_manager.md
|
||||
writeOptions 'NixOS' ${(makeGlobalOptionsDoc nixosConfiguration)} src/options/global/nixos.md
|
||||
mkdir --parents src/options/platforms
|
||||
writeOptions 'Home Manager' ${(makePlatformsOptionsDoc homeManagerConfiguration)} src/options/platforms/home_manager.md
|
||||
writeOptions 'NixOS' ${(makePlatformsOptionsDoc nixosConfiguration)} src/options/platforms/nixos.md
|
||||
|
||||
mkdir --parents src/options/modules
|
||||
${modulePageScript}
|
||||
|
|
|
|||
|
|
@ -14,11 +14,15 @@
|
|||
- [Testbeds](testbeds.md)
|
||||
- [Style guide](styling.md)
|
||||
|
||||
# Platforms
|
||||
# Reference
|
||||
|
||||
- [Home Manager](options/global/home_manager.md)
|
||||
- [NixOS](options/global/nixos.md)
|
||||
<!--
|
||||
The auto-generated list of modules is appended to this file, so this must
|
||||
be the last section, and modules must be the last page, with no comments
|
||||
following it. There must be a trailing newline.
|
||||
-->
|
||||
|
||||
# Modules
|
||||
|
||||
<!-- The auto-generated list of modules will be added below. -->
|
||||
- [Platforms]() <!-- TODO: migrate general platforms content to this page. -->
|
||||
- [Home Manager](options/platforms/home_manager.md)
|
||||
- [NixOS](options/platforms/nixos.md)
|
||||
- [Modules]() <!-- TODO: migrate general modules content to this page. -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue