Features
Esta página aún no está disponible en tu idioma.
StudioCMS Integration config options schema reference
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: {},});
robotsTXT
Section titled “robotsTXT”robotsTXT
Allows the user to enable/disable and configure the use of the StudioCMS Custom astro-robots-txt
Integration
- Type:
RobotsConfig
|boolean
- Default:
{ policy: [ { userAgent: ['*'], allow: ['/'], disallow: ['/dashboard/'] } ] }
Note: robotsTXT
can also be set to false
to disable it.
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: { robotsTXT?: boolean | RobotsConfig | undefined
robotsTXT: { RobotsConfig.policy?: PolicyOptions[] | undefined
policy: [ { PolicyOptions.userAgent?: UserAgentType | UserAgentType[]
userAgent: ['*'], PolicyOptions.allow?: string | string[]
allow: ['/'], PolicyOptions.disallow?: string | string[]
disallow: ['/dashboard/'], } ] } }})
injectQuickActionsMenu
Section titled “injectQuickActionsMenu”injectQuickActionsMenu
allows enabling and disabling the quick actions menu which allows easy access to your dashboard while logged in on non-dashboard pages.
- Type:
boolean
- Default:
true
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: { injectQuickActionsMenu?: boolean | undefined
injectQuickActionsMenu: true }})
sdk
can either be a boolean or an object containing cache configuration. If it is a boolean, it defaults to true
and transforms into an object with default cache configuration.
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined;} | undefined
sdk: {} }})
cacheConfig
Section titled “cacheConfig”cacheConfig
is an object that is used to configure the cache for the SDK.
- Type:
boolean
|{ lifetime?: string | undefined; }
|undefined
- Default:
{ lifetime: '5m' }
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined;} | undefined
sdk: { // DEFAULT - This uses the default cache configuration. cacheConfig?: boolean | { lifetime?: string | undefined;} | undefined
cacheConfig: { lifetime?: string | undefined
lifetime: '5m', }, } }})
dashboardConfig
Section titled “dashboardConfig”dashboardConfig
allows customization of the Dashboard Configuration
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: { dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined;} | undefined
dashboardConfig: {} }})
dashboardEnabled
Section titled “dashboardEnabled”dashboardEnabled
allows the user to enable or disable the StudioCMS dashboard but still provide all the helper’s and utilities to those who are customizing their setup, doing so will disable the dashboard and you will need to manage your content via your database
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: { dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined;} | undefined
dashboardConfig: { dashboardEnabled?: boolean | undefined
dashboardEnabled: true, } }})
inject404Route
Section titled “inject404Route”inject404Route
allows the user to enable or disable the default 404 route for the dashboard
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: { dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined;} | undefined
dashboardConfig: { inject404Route?: boolean | undefined
inject404Route: true, } }})
faviconURL
Section titled “faviconURL”faviconURL
allows the user to override the default Favicon URL to a custom URL
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: { dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined;} | undefined
dashboardConfig: { faviconURL?: string | undefined
faviconURL: '/favicon.svg', } }})
dashboardRouteOverride
Section titled “dashboardRouteOverride”dashboardRouteOverride
allows the user to change the base route at which the dashboard is served (e.g., /admin
instead of /dashboard
)
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: { dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined;} | undefined
dashboardConfig: { dashboardRouteOverride?: string | undefined
dashboardRouteOverride: 'dashboard', } }})
versionCheck
Section titled “versionCheck”versionCheck
allows the user to enable or disable the version check for the dashboard.
This will check for the latest version of StudioCMS and notify the user if there is a new version available.
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: { dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined;} | undefined
dashboardConfig: { versionCheck?: boolean | undefined
versionCheck: true, } }})
authConfig
Section titled “authConfig”authConfig
Allows customization of the Authentication Configuration
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: { authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined;} | undefined
authConfig: {} }})
enabled
Section titled “enabled”Allows enabling or disabling of the Authentication Configuration
- Type:
boolean
- Default:
true
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: { authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined;} | undefined
authConfig: { enabled?: boolean | undefined
enabled: true } }})
providers
Section titled “providers”Allows enabling or disabling of the Authentication Providers
The following provider can be configured from here: usernameAndPassword
.
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: { authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined;} | undefined
authConfig: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined;} | undefined
providers: { usernameAndPassword?: boolean | undefined
usernameAndPassword: true, usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined;} | undefined
usernameAndPasswordConfig: { allowUserRegistration?: boolean | undefined
allowUserRegistration: true } } } }})
developerConfig
Section titled “developerConfig”developerConfig
Allows customization of the Developer Options
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: { developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined;} | undefined
developerConfig: {} }})
demoMode
Section titled “demoMode”Enable demo mode for the site. If set to an object, the site will be in demo mode, and the user will be able to login with the provided username and password.
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: { developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined;} | undefined
developerConfig: { demoMode?: false | { password: string; username: string;} | undefined
demoMode: { username: string
username: 'foo', password: string
password: 'bar' } } }})
preferredImageService
Section titled “preferredImageService”preferredImageService
Allows setting the identifier of the Preferred Image Service
Requires an Image Service to be installed such as 'cloudinary-js'
- Type:
string
|undefined
- Default:
undefined
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; injectQuickActionsMenu?: boolean | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; versionCheck?: boolean | undefined; } | undefined; authConfig?: { providers?: { usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; preferredImageService?: string ...
A utility function to define the StudioCMS config object.
This function is used to define the optional StudioCMS
config object in the Astro project root. The expected file
name is studiocms.config.mjs
. And it should be adjacent
to the Astro project's astro.config.mjs
file.
StudioCMS will attempt to import this file and use the default
export as the StudioCMS config object automatically if it exists.
Using this function is optional, but it can be useful for IDEs
to provide better intellisense and type checking.
defineStudioCMSConfig({ features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | RobotsConfig | undefined; ... 4 more ...; preferredImageService?: string | undefined;} | undefined
features: { preferredImageService?: string | undefined
preferredImageService: var undefined
undefined }})