feat(generator): add -default-view to choose timeline or grid as site root
The chosen view is published at /, the other under /timeline/ or /grid/. Page paths, pager links and the cross-links between the views are derived from the setting. The directory named after the default view is removed on build, since it can only be a leftover from before a switch. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -82,6 +82,12 @@ in {
|
||||
description = "Photos per page on the timeline and grid views. The timeline packs whole days, so pages vary slightly around this.";
|
||||
};
|
||||
|
||||
defaultView = lib.mkOption {
|
||||
type = lib.types.enum [ "timeline" "grid" ];
|
||||
default = "timeline";
|
||||
description = "View published at the site root. The other one is published under /timeline/ or /grid/.";
|
||||
};
|
||||
|
||||
nginx = {
|
||||
enable = lib.mkEnableOption "nginx virtual host for photogallery";
|
||||
|
||||
@@ -148,6 +154,7 @@ in {
|
||||
"--serif-family" cfg.serifFamily
|
||||
"--ml-family" cfg.mlFamily
|
||||
"--page-size" (toString cfg.pageSize)
|
||||
"--default-view" cfg.defaultView
|
||||
];
|
||||
|
||||
Restart = "on-failure";
|
||||
|
||||
Reference in New Issue
Block a user