File tree Expand file tree Collapse file tree 3 files changed +34
-45
lines changed Expand file tree Collapse file tree 3 files changed +34
-45
lines changed Original file line number Diff line number Diff line change 12
12
13
13
imports = [
14
14
./_util.nix
15
- ./files.nix
16
15
./mdbook
17
16
./menu
18
17
./options.nix
19
18
./pages.nix
20
19
./platforms.nix
20
+ ./user-guide.nix
21
21
] ;
22
22
23
23
config . docs = {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ {
2
+ lib ,
3
+ pkgs ,
4
+ ...
5
+ } :
6
+ let
7
+ user-guide = ../../docs/user-guide ;
8
+
9
+ sourceTransformers = {
10
+ config-examples =
11
+ template :
12
+ pkgs . callPackage ./user-configs.nix {
13
+ inherit template ;
14
+ } ;
15
+ } ;
16
+ in
17
+ {
18
+ docs . pages = lib . concatMapAttrs (
19
+ name : type :
20
+ let
21
+ title = lib . removeSuffix ".md" name ;
22
+ transformer = sourceTransformers . ${ title } or lib . id ;
23
+ in
24
+ lib . optionalAttrs ( type == "regular" ) {
25
+ "user-guide/${ title } " = {
26
+ menu . section = "user-guide" ;
27
+ # TODO: define user-facing titles to show in the menu...
28
+ menu . location = [ title ] ;
29
+ source = transformer "${ user-guide } /${ name } " ;
30
+ } ;
31
+ }
32
+ ) ( builtins . readDir user-guide ) ;
33
+ }
You can’t perform that action at this time.
0 commit comments