StudioCMSOptions
StudioCMS Integration config options schema reference
// Default Values shownexport default function defineStudioCMSConfig(config: StudioCMSOptions): { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; dbStartPage?: boolean | undefined; imageService?: { cdnPlugin?: "cloudinary-js" | undefined; } | undefined; defaultFrontEndConfig?: boolean | { htmlDefaultLanguage?: string | undefined; htmlDefaultHead?: { tag: "link" | "title" | "base" | "style" | "meta" | "script" | "noscript" | "template"; attrs?: Record<string, string | boolean | undefined> | undefined; content?: string | undefined; }[] | undefined; favicon?: string | undefined; injectQuickActionsMenu?: boolean | undefined; } | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; AuthConfig?: { providers?: { github?: boolean | undefined; discord?: boolean | undefined; google?: boolean | undefined; auth0?: boolean | undefined; usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: 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({ dbStartPage?: boolean | undefined
dbStartPage: true, dateLocale?: string | undefined
dateLocale: 'en-us', verbose?: boolean | undefined
verbose: false, plugins?: StudioCMSPlugin[] | undefined
plugins: [], componentRegistry?: Record<string, string> | undefined
componentRegistry: {}, overrides?: { CustomImageOverride?: string | undefined; FormattedDateOverride?: string | undefined;} | undefined
overrides: {}, imageService?: { cdnPlugin?: "cloudinary-js" | undefined;} | undefined
imageService: {}, defaultFrontEndConfig?: boolean | { htmlDefaultLanguage?: string | undefined; htmlDefaultHead?: { tag: "link" | "title" | "base" | "style" | "meta" | "script" | "noscript" | "template"; attrs?: Record<string, string | boolean | undefined> | undefined; content?: string | undefined; }[] | undefined; favicon?: string | undefined; injectQuickActionsMenu?: boolean | undefined;} | undefined
defaultFrontEndConfig: {}, dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; AuthConfig?: { providers?: { github?: boolean | undefined; discord?: boolean | undefined; google?: boolean | undefined; auth0?: boolean | undefined; usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: string; username: string; } | undefined; } | undefined; versionCheck?: boolean | undefined;} | undefined
dashboardConfig: {}, includedIntegrations?: { robotsTXT?: boolean | RobotsConfig | undefined;} | undefined
includedIntegrations: {}, dateTimeFormat?: Intl.DateTimeFormatOptions | undefined
dateTimeFormat: {}, sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined;} | undefined
sdk: {}, pageTypeOptions?: { markdown?: { flavor: "astro"; sanitize?: { allowElements?: string[] | undefined; blockElements?: string[] | undefined; dropElements?: string[] | undefined; allowAttributes?: Record<string, string[]> | undefined; dropAttributes?: Record<string, string[]> | undefined; allowComponents?: boolean | undefined; allowCustomElements?: boolean | undefined; allowComments?: boolean | undefined; } | undefined; } | { flavor: "studiocms"; sanitize?: { allowElements?: string[] | undefined; blockElements?: string[] | undefined; dropElements?: string[] | undefined; allowAttributes?: Record<string, string[]> | undefined; dropAttributes?: Record<string, string[]> | undefined; allowComponents?: boolean | undefined; allowCustomElements?: boolean | undefined; allowComments?: boolean | undefined; } | undefined; callouts?: false | "github" | "obsidian" | "vitepress" | undefined; autoLinkHeadings?: boolean | undefined; discordSubtext?: boolean | undefined; } | undefined; html?: { sanitize?: { allowElements?: string[] | undefined; blockElements?: string[] | undefined; dropElements?: string[] | undefined; allowAttributes?: Record<string, string[]> | undefined; dropAttributes?: Record<string, string[]> | undefined; allowComponents?: boolean | undefined ...
pageTypeOptions: {}});
dbStartPage
Section titled “dbStartPage”Project initialization page - Used during first time setup to create your database configuration.
- Type:
boolean
- Default:
true
export default function defineStudioCMSConfig(config: StudioCMSOptions): { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; dbStartPage?: boolean | undefined; imageService?: { cdnPlugin?: "cloudinary-js" | undefined; } | undefined; defaultFrontEndConfig?: boolean | { htmlDefaultLanguage?: string | undefined; htmlDefaultHead?: { tag: "link" | "title" | "base" | "style" | "meta" | "script" | "noscript" | "template"; attrs?: Record<string, string | boolean | undefined> | undefined; content?: string | undefined; }[] | undefined; favicon?: string | undefined; injectQuickActionsMenu?: boolean | undefined; } | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; AuthConfig?: { providers?: { github?: boolean | undefined; discord?: boolean | undefined; google?: boolean | undefined; auth0?: boolean | undefined; usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: 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({ dbStartPage?: boolean | undefined
dbStartPage: true, // DEFAULT - This injects a start page to setup your DB data.})
dateLocale
Section titled “dateLocale”dateLocale
is a string that is used to determine the locale for date formatting.
- Type:
string
- Default:
'en-us'
export default function defineStudioCMSConfig(config: StudioCMSOptions): { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; dbStartPage?: boolean | undefined; imageService?: { cdnPlugin?: "cloudinary-js" | undefined; } | undefined; defaultFrontEndConfig?: boolean | { htmlDefaultLanguage?: string | undefined; htmlDefaultHead?: { tag: "link" | "title" | "base" | "style" | "meta" | "script" | "noscript" | "template"; attrs?: Record<string, string | boolean | undefined> | undefined; content?: string | undefined; }[] | undefined; favicon?: string | undefined; injectQuickActionsMenu?: boolean | undefined; } | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; AuthConfig?: { providers?: { github?: boolean | undefined; discord?: boolean | undefined; google?: boolean | undefined; auth0?: boolean | undefined; usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: 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({ dateLocale?: string | undefined
dateLocale: 'en-us', // DEFAULT - This sets the date locale for date formatting.})
verbose
Section titled “verbose”verbose
is a boolean that is used to enable or disable verbose logging.
- Type:
boolean
- Default:
false
export default function defineStudioCMSConfig(config: StudioCMSOptions): { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; dbStartPage?: boolean | undefined; imageService?: { cdnPlugin?: "cloudinary-js" | undefined; } | undefined; defaultFrontEndConfig?: boolean | { htmlDefaultLanguage?: string | undefined; htmlDefaultHead?: { tag: "link" | "title" | "base" | "style" | "meta" | "script" | "noscript" | "template"; attrs?: Record<string, string | boolean | undefined> | undefined; content?: string | undefined; }[] | undefined; favicon?: string | undefined; injectQuickActionsMenu?: boolean | undefined; } | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; AuthConfig?: { providers?: { github?: boolean | undefined; discord?: boolean | undefined; google?: boolean | undefined; auth0?: boolean | undefined; usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: 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({ verbose?: boolean | undefined
verbose: false, // DEFAULT - This sets the verbose logging to false.})
plugins
Section titled “plugins”plugins
is an array that is used to determine which plugins should be loaded.
- Type:
StudioCMSPlugin[]
- Default:
[]
import function blog(options?: StudioCMSBlogOptions): StudioCMSPlugin
Creates and configures the StudioCMS Blog plugin.
blog from '@studiocms/blog';export default function defineStudioCMSConfig(config: StudioCMSOptions): { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; dbStartPage?: boolean | undefined; imageService?: { cdnPlugin?: "cloudinary-js" | undefined; } | undefined; defaultFrontEndConfig?: boolean | { htmlDefaultLanguage?: string | undefined; htmlDefaultHead?: { tag: "link" | "title" | "base" | "style" | "meta" | "script" | "noscript" | "template"; attrs?: Record<string, string | boolean | undefined> | undefined; content?: string | undefined; }[] | undefined; favicon?: string | undefined; injectQuickActionsMenu?: boolean | undefined; } | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; AuthConfig?: { providers?: { github?: boolean | undefined; discord?: boolean | undefined; google?: boolean | undefined; auth0?: boolean | undefined; usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: 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({ plugins?: StudioCMSPlugin[] | undefined
plugins: [ function blog(options?: StudioCMSBlogOptions): StudioCMSPlugin
Creates and configures the StudioCMS Blog plugin.
blog(), ],})
componentRegistry
Section titled “componentRegistry”componentRegistry
is an object that is used to register components.
- Type:
Record<string, string>
- Default:
{}
export default function defineStudioCMSConfig(config: StudioCMSOptions): { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; dbStartPage?: boolean | undefined; imageService?: { cdnPlugin?: "cloudinary-js" | undefined; } | undefined; defaultFrontEndConfig?: boolean | { htmlDefaultLanguage?: string | undefined; htmlDefaultHead?: { tag: "link" | "title" | "base" | "style" | "meta" | "script" | "noscript" | "template"; attrs?: Record<string, string | boolean | undefined> | undefined; content?: string | undefined; }[] | undefined; favicon?: string | undefined; injectQuickActionsMenu?: boolean | undefined; } | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; AuthConfig?: { providers?: { github?: boolean | undefined; discord?: boolean | undefined; google?: boolean | undefined; auth0?: boolean | undefined; usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: 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({ componentRegistry?: Record<string, string> | undefined
componentRegistry: { 'my-component': 'src/components/MyComponent.astro', },})
dateTimeFormat
Section titled “dateTimeFormat”dateTimeFormat
is an object that is used to configure the date time format.
- Type:
Intl.DateTimeFormatOptions
- Default:
{}
export default function defineStudioCMSConfig(config: StudioCMSOptions): { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; dbStartPage?: boolean | undefined; imageService?: { cdnPlugin?: "cloudinary-js" | undefined; } | undefined; defaultFrontEndConfig?: boolean | { htmlDefaultLanguage?: string | undefined; htmlDefaultHead?: { tag: "link" | "title" | "base" | "style" | "meta" | "script" | "noscript" | "template"; attrs?: Record<string, string | boolean | undefined> | undefined; content?: string | undefined; }[] | undefined; favicon?: string | undefined; injectQuickActionsMenu?: boolean | undefined; } | undefined; dashboardConfig?: { dashboardEnabled?: boolean | undefined; inject404Route?: boolean | undefined; faviconURL?: string | undefined; dashboardRouteOverride?: string | undefined; AuthConfig?: { providers?: { github?: boolean | undefined; discord?: boolean | undefined; google?: boolean | undefined; auth0?: boolean | undefined; usernameAndPassword?: boolean | undefined; usernameAndPasswordConfig?: { allowUserRegistration?: boolean | undefined; } | undefined; } | undefined; enabled?: boolean | undefined; } | undefined; developerConfig?: { demoMode?: false | { password: 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({ dateTimeFormat?: Intl.DateTimeFormatOptions | undefined
dateTimeFormat: { Intl.DateTimeFormatOptions.year?: "numeric" | "2-digit" | undefined
year: "numeric", Intl.DateTimeFormatOptions.month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined
month: "short", Intl.DateTimeFormatOptions.day?: "numeric" | "2-digit" | undefined
day: "numeric" },})
overrides
Section titled “overrides”overrides
is an object that is used to override the default configuration.
imageService
Section titled “imageService”imageService
is an object that is used to configure the image service.
defaultFrontEndConfig
Section titled “defaultFrontEndConfig”defaultFrontEndConfig
is an object that is used to configure the default front-end.
dashboardConfig
Section titled “dashboardConfig”dashboardConfig
is an object that is used to configure the dashboard.
includedIntegrations
Section titled “includedIntegrations”includedIntegrations
is an object that is used to configure which integrations should be included.
sdk
is an object that is used to configure the SDK.