Skip to content

GlobalConfigSchema

const GlobalConfigSchema: ZodObject<{ dataFetching: ZodOptional<ZodObject<{ defaultStrategy: ZodDefault<ZodEnum<["runtime", "build", "hybrid"]>>; retryAttempts: ZodDefault<ZodNumber>; timeout: ZodDefault<ZodNumber>; }, "strip", ZodTypeAny, { defaultStrategy: "runtime" | "build" | "hybrid"; retryAttempts: number; timeout: number; }, { defaultStrategy?: "runtime" | "build" | "hybrid"; retryAttempts?: number; timeout?: number; }>>; defaultCenter: ZodOptional<ZodTuple<[ZodNumber, ZodNumber], null>>; defaultMapStyle: ZodOptional<ZodString>; defaultZoom: ZodOptional<ZodNumber>; description: ZodOptional<ZodString>; theme: ZodDefault<ZodEnum<["light", "dark"]>>; title: ZodOptional<ZodString>; }, "strip", ZodTypeAny, { dataFetching?: { defaultStrategy: "runtime" | "build" | "hybrid"; retryAttempts: number; timeout: number; }; defaultCenter?: [number, number]; defaultMapStyle?: string; defaultZoom?: number; description?: string; theme: "light" | "dark"; title?: string; }, { dataFetching?: { defaultStrategy?: "runtime" | "build" | "hybrid"; retryAttempts?: number; timeout?: number; }; defaultCenter?: [number, number]; defaultMapStyle?: string; defaultZoom?: number; description?: string; theme?: "light" | "dark"; title?: string; }>

Defined in: packages/core/src/schemas/page.schema.ts:254

Global configuration.

Global settings that apply across all pages.

General:

  • title - Application title
  • description - Application description
  • defaultMapStyle - Default map style for all maps
  • theme - Default theme (light/dark)

Data Fetching:

  • defaultStrategy - Default fetch strategy (runtime, build, hybrid)
  • timeout - Default fetch timeout
  • retryAttempts - Default retry attempts

Basic Config

config:
title: "My Map App"
description: "Interactive maps and stories"
defaultMapStyle: "https://demotiles.maplibre.org/style.json"

With Data Fetching

config:
title: "My Map App"
defaultMapStyle: "https://demotiles.maplibre.org/style.json"
theme: dark
dataFetching:
defaultStrategy: build
timeout: 15000
retryAttempts: 5