Under construction mode (developer tool)
Site Settings -> Under construction: a switch, 'Pages still available' and notice texts. When on, only the homepage and the chosen pages open (every language); other addresses redirect to the homepage with the notice (createPageRoute redirect option), and <ConstructionNotice> cancels clicks on links to blocked pages and shows the notice. getConstructionMode(locale). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -6,6 +6,8 @@ import { themeFields } from './fields/theme.js'
|
||||
type BuildSiteSettingsArgs = {
|
||||
/** Extra fields injected by the client project */
|
||||
additionalFields?: Field[]
|
||||
/** "Under construction" tab (developer tool) — given when the pages module is on. */
|
||||
constructionFields?: Field[]
|
||||
/**
|
||||
* Fields for the "System Pages" tab — page assignments by role (homepage,
|
||||
* privacy policy, collection archives). Assembled by the caller, which is the
|
||||
@@ -30,6 +32,7 @@ type BuildSiteSettingsArgs = {
|
||||
*/
|
||||
export function buildSiteSettings({
|
||||
additionalFields,
|
||||
constructionFields,
|
||||
systemPageFields,
|
||||
}: BuildSiteSettingsArgs = {}): GlobalConfig {
|
||||
return {
|
||||
@@ -55,6 +58,7 @@ export function buildSiteSettings({
|
||||
...(systemPageFields?.length
|
||||
? [{ fields: systemPageFields, label: 'System Pages' }]
|
||||
: []),
|
||||
...(constructionFields?.length ? [{ fields: constructionFields, label: 'Under construction' }] : []),
|
||||
...(additionalFields?.length ? [{ fields: additionalFields, label: 'Custom' }] : []),
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user