Added not-found support for sitesettings

This commit is contained in:
2026-10-12 17:32:31 +02:00
parent c852d7bdae
commit 7aebe24236
52 changed files with 837 additions and 95 deletions
+3
View File
@@ -8,6 +8,7 @@ import { ALL_SYSTEM_PAGE_ROLES } from './types.js'
const ROLE_LABELS: Record<SystemPageRole, string> = {
cookiePolicy: 'Cookie Policy',
homepage: 'Homepage',
notFound: '404 (Not Found)',
privacyPolicy: 'Privacy Policy',
termsOfService: 'Terms of Service',
}
@@ -16,6 +17,8 @@ const ROLE_LABELS: Record<SystemPageRole, string> = {
const ROLE_DESCRIPTIONS: Record<SystemPageRole, string> = {
cookiePolicy: 'Page linked from the cookie consent banner.',
homepage: 'Page served at the locale root (e.g. /pl, /en).',
notFound:
'Page shown for unknown URLs (404). Pick a dedicated "Not found" page, or reuse the homepage. If left empty, the project falls back to its built-in not-found view.',
privacyPolicy: 'Page linked as the privacy policy.',
termsOfService: 'Page linked as the terms of service / site regulations.',
}
+3 -1
View File
@@ -2,13 +2,15 @@
* Built-in "system page" roles — documents from the client's Pages
* collection that the site references by function rather than by slug.
*/
export type SystemPageRole = 'cookiePolicy' | 'homepage' | 'privacyPolicy' | 'termsOfService'
export type SystemPageRole =
'cookiePolicy' | 'homepage' | 'notFound' | 'privacyPolicy' | 'termsOfService'
/**
* All system roles in a stable order (used when no subset is configured).
*/
export const ALL_SYSTEM_PAGE_ROLES: readonly SystemPageRole[] = [
'homepage',
'notFound',
'privacyPolicy',
'cookiePolicy',
'termsOfService',