feat: user-managed templates

This commit is contained in:
2026-02-27 20:00:53 +01:00
parent e25a0d85a5
commit f3364999ee
47 changed files with 3664 additions and 40 deletions

View File

@@ -1,3 +1,4 @@
import path from 'node:path';
import type { CategoryRenderSettings } from './PageRenderer';
import { buildCanonicalPostPath } from './PageRenderer';
import type { MenuDocument } from './MenuEngine';
@@ -210,6 +211,7 @@ export function createPreviewBackedGenerationRouteRenderer(params: {
getMenu: async () => menu,
},
getActiveProjectContext: async () => projectContext,
userTemplatesDir: path.join(params.options.dataDir, 'templates'),
});
const htmlRewriteContextPromise: Promise<{ canonicalPostPathBySlug: Map<string, string>; canonicalMediaPathBySourcePath: Map<string, string> }> = (async () => {