fix: 0-byte index.html day archives

This commit is contained in:
2026-02-22 15:34:16 +01:00
parent b4109d7210
commit a7e7ae5b1a
8 changed files with 211 additions and 7 deletions

View File

@@ -18,6 +18,7 @@ interface RenderContext {
menu?: MenuDocument;
skipContextSetup?: boolean;
maxPostsPerPage?: number;
allowEmptyArchiveRender?: boolean;
}
export function createGenerationRouteRenderer(params: {
@@ -111,6 +112,10 @@ export function createPreviewBackedGenerationRouteRenderer(params: {
const serializeFilter = (filter: unknown): string => {
const normalizeValue = (value: unknown): unknown => {
if (value instanceof Date) {
return value.toISOString();
}
if (Array.isArray(value)) {
return value.map((entry) => normalizeValue(entry));
}
@@ -244,6 +249,7 @@ export function createPreviewBackedGenerationRouteRenderer(params: {
menu,
skipContextSetup: true,
maxPostsPerPage: params.maxPostsPerPage,
allowEmptyArchiveRender: true,
},
});
}