feat static pages system with dynamic footer and safe html rendering

This commit is contained in:
sdarbinyan
2026-07-05 03:37:35 +04:00
parent 0089790d41
commit b0c5c5e051
11 changed files with 566 additions and 10 deletions

View File

@@ -0,0 +1,36 @@
export interface LocalizedHtmlContent {
[locale: string]: string;
}
export interface LocalizedTextContent {
[locale: string]: string;
}
export interface StaticPageConfig {
route: string;
title: LocalizedTextContent;
content: LocalizedHtmlContent;
seo?: {
title?: LocalizedTextContent;
description?: LocalizedTextContent;
robots?: string;
};
visible?: boolean;
}
export interface LegacyStaticPageConfig {
key: string;
route: string | { path: string; exact?: boolean };
title?: string | LocalizedTextContent;
content?: string | LocalizedHtmlContent | { value?: string; contentType?: string; source?: string };
visible?: boolean;
}
export type StaticPagesConfig = Record<string, StaticPageConfig> | LegacyStaticPageConfig[];
export interface ResolvedStaticPage {
key: string;
route: string;
title: string;
html: string;
}