File tree 3 files changed +35
-45
lines changed
3 files changed +35
-45
lines changed Original file line number Diff line number Diff line change 15
15
16
16
imports = [
17
17
./_util.nix
18
- ./files.nix
19
18
./mdbook
20
19
./menu
21
20
./options.nix
22
21
./pages.nix
23
22
./platforms.nix
23
+ ./user-guide.nix
24
24
] ;
25
25
26
26
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
+ # TODO: contributing file
19
+ docs . pages = lib . concatMapAttrs (
20
+ name : type :
21
+ let
22
+ title = lib . removeSuffix ".md" name ;
23
+ transformer = sourceTransformers . ${ title } or lib . id ;
24
+ in
25
+ lib . optionalAttrs ( type == "regular" ) {
26
+ "user-guide/${ title } " = {
27
+ menu . section = "user-guide" ;
28
+ # TODO: define user-facing titles to show in the menu...
29
+ menu . location = [ title ] ;
30
+ source = transformer "${ user-guide } /${ name } " ;
31
+ } ;
32
+ }
33
+ ) ( builtins . readDir user-guide ) ;
34
+ }
You can’t perform that action at this time.
0 commit comments