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:
fox
2026-09-30 08:16:50 +02:00
co-authored by Claude Fable 5.1
parent f33bdd55b1
commit f1abd45f24
9 changed files with 208 additions and 38 deletions
+7
View File
@@ -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";