StudioCMSOptions
StudioCMS Integration config options schema reference
// Default Values shownexport 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 | { host?: string | boolean | undefined; sitemap?: string | boolean | string[] | undefined; policy?: { userAgent?: "360Spider" | "360Spider-Image" | "360Spider-Video" | "HaoSouSpider" | "AdsBot-Google" | "AdsBot-Google-Mobile" | "AdsBot-Google-Mobile-Apps" | "Googlebot" | "Googlebot-Image" | "Googlebot-Mobile" | "Googlebot-News" | "Googlebot-Video" | "Mediapartners-Google" | "adidxbot" | "bingbot" | "BingPreview" | "MicrosoftPreview" | "msnbot" | "msnbot-media" | "Applebot" | "AppleNewsBot" | "Baiduspider" | "Baiduspider-image" | "Baiduspider-mobile" | "Baiduspider-news" | "Baiduspider-video" | "coccoc" | "coccocbot-image" | "coccocbot-web" | "DuckDuckBot" | "DuckDuckGo-Favicons-Bot" | "facebookcatalog" | "facebookexternalhit" | "Facebot" | "gooblog" | "ichiro" | "Sogou blog" | "Sogou inst spider" | "Sogou News Spider" | "Sogou Orion spider" | "Sogou spider2" | "Sogou web spider" ...
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, verbose?: boolean | undefined
verbose: false, logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined
logLevel: 'Info', plugins?: StudioCMSPlugin[] | undefined
plugins: [], componentRegistry?: Record<string, string> | undefined
componentRegistry: {}, locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined;} | undefined
locale: {}, features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | { host?: string | boolean | undefined; sitemap?: string | boolean | string[] | undefined; policy?: { userAgent?: "360Spider" | "360Spider-Image" | "360Spider-Video" | "HaoSouSpider" | "AdsBot-Google" | "AdsBot-Google-Mobile" | "AdsBot-Google-Mobile-Apps" | "Googlebot" | "Googlebot-Image" | "Googlebot-Mobile" | "Googlebot-News" | "Googlebot-Video" | "Mediapartners-Google" | "adidxbot" | "bingbot" | "BingPreview" | "MicrosoftPreview" | "msnbot" | "msnbot-media" | "Applebot" | "AppleNewsBot" | "Baiduspider" | "Baiduspider-image" | "Baiduspider-mobile" | "Baiduspider-news" | "Baiduspider-video" | "coccoc" | "coccocbot-image" | "coccocbot-web" | "DuckDuckBot" | "DuckDuckGo-Favicons-Bot" | "facebookcatalog" | "facebookexternalhit" | "Facebot" | "gooblog" | "ichiro" | "Sogou blog" | "Sogou inst spider" | "Sogou News Spider" | "Sogou Orion spider" | "Sogou spider2" | "Sogou web spider" | "Yandex" | "YandexMobileBot" | "Algolia Crawler" | "BublupBot" | "CCBot" | "Cliqzbot" | "Daumoa" | "DeuSu" | "EuripBot" | "Exploratodo" | "Feedly" | "Findxbot" | "istellabot" | "JikeSpider" | "Lycos" | "Mail.Ru" | "MojeekBot" | "OrangeBot" | "Pinterest" | "Plukkie" | "Qwantify" | "Rambler" | "SemanticScholarBot" | "SeznamBot" | "Sosospider" | "Slurp" | "Twitterbot" | "WhatsApp" | "yacybot" | "YepBot" | "Yeti" | "YioopBot" | "yoozBot" | "YoudaoBot" | "*" | ("360Spider" | "360Spider-Image" | "360Spider-Video" ...
features: {}});
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): { 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 | { host?: string | boolean | undefined; sitemap?: string | boolean | string[] | undefined; policy?: { userAgent?: "360Spider" | "360Spider-Image" | "360Spider-Video" | "HaoSouSpider" | "AdsBot-Google" | "AdsBot-Google-Mobile" | "AdsBot-Google-Mobile-Apps" | "Googlebot" | "Googlebot-Image" | "Googlebot-Mobile" | "Googlebot-News" | "Googlebot-Video" | "Mediapartners-Google" | "adidxbot" | "bingbot" | "BingPreview" | "MicrosoftPreview" | "msnbot" | "msnbot-media" | "Applebot" | "AppleNewsBot" | "Baiduspider" | "Baiduspider-image" | "Baiduspider-mobile" | "Baiduspider-news" | "Baiduspider-video" | "coccoc" | "coccocbot-image" | "coccocbot-web" | "DuckDuckBot" | "DuckDuckGo-Favicons-Bot" | "facebookcatalog" | "facebookexternalhit" | "Facebot" | "gooblog" | "ichiro" | "Sogou blog" | "Sogou inst spider" | "Sogou News Spider" | "Sogou Orion spider" | "Sogou spider2" | "Sogou web spider" ...
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.})
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): { 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 | { host?: string | boolean | undefined; sitemap?: string | boolean | string[] | undefined; policy?: { userAgent?: "360Spider" | "360Spider-Image" | "360Spider-Video" | "HaoSouSpider" | "AdsBot-Google" | "AdsBot-Google-Mobile" | "AdsBot-Google-Mobile-Apps" | "Googlebot" | "Googlebot-Image" | "Googlebot-Mobile" | "Googlebot-News" | "Googlebot-Video" | "Mediapartners-Google" | "adidxbot" | "bingbot" | "BingPreview" | "MicrosoftPreview" | "msnbot" | "msnbot-media" | "Applebot" | "AppleNewsBot" | "Baiduspider" | "Baiduspider-image" | "Baiduspider-mobile" | "Baiduspider-news" | "Baiduspider-video" | "coccoc" | "coccocbot-image" | "coccocbot-web" | "DuckDuckBot" | "DuckDuckGo-Favicons-Bot" | "facebookcatalog" | "facebookexternalhit" | "Facebot" | "gooblog" | "ichiro" | "Sogou blog" | "Sogou inst spider" | "Sogou News Spider" | "Sogou Orion spider" | "Sogou spider2" | "Sogou web spider" ...
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.})
logLevel
Section titled “logLevel”logLevel
is a union for setting the LogLevel for Effect based code.
- Type:
All
|Fatal
|Error
|Warning
|Info
|Debug
|Trace
|None
- Default:
Info
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 | { host?: string | boolean | undefined; sitemap?: string | boolean | string[] | undefined; policy?: { userAgent?: "360Spider" | "360Spider-Image" | "360Spider-Video" | "HaoSouSpider" | "AdsBot-Google" | "AdsBot-Google-Mobile" | "AdsBot-Google-Mobile-Apps" | "Googlebot" | "Googlebot-Image" | "Googlebot-Mobile" | "Googlebot-News" | "Googlebot-Video" | "Mediapartners-Google" | "adidxbot" | "bingbot" | "BingPreview" | "MicrosoftPreview" | "msnbot" | "msnbot-media" | "Applebot" | "AppleNewsBot" | "Baiduspider" | "Baiduspider-image" | "Baiduspider-mobile" | "Baiduspider-news" | "Baiduspider-video" | "coccoc" | "coccocbot-image" | "coccocbot-web" | "DuckDuckBot" | "DuckDuckGo-Favicons-Bot" | "facebookcatalog" | "facebookexternalhit" | "Facebot" | "gooblog" | "ichiro" | "Sogou blog" | "Sogou inst spider" | "Sogou News Spider" | "Sogou Orion spider" | "Sogou spider2" | "Sogou web spider" ...
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({ logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined
logLevel: 'Info', // DEFAULT})
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): { 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 | { host?: string | boolean | undefined; sitemap?: string | boolean | string[] | undefined; policy?: { userAgent?: "360Spider" | "360Spider-Image" | "360Spider-Video" | "HaoSouSpider" | "AdsBot-Google" | "AdsBot-Google-Mobile" | "AdsBot-Google-Mobile-Apps" | "Googlebot" | "Googlebot-Image" | "Googlebot-Mobile" | "Googlebot-News" | "Googlebot-Video" | "Mediapartners-Google" | "adidxbot" | "bingbot" | "BingPreview" | "MicrosoftPreview" | "msnbot" | "msnbot-media" | "Applebot" | "AppleNewsBot" | "Baiduspider" | "Baiduspider-image" | "Baiduspider-mobile" | "Baiduspider-news" | "Baiduspider-video" | "coccoc" | "coccocbot-image" | "coccocbot-web" | "DuckDuckBot" | "DuckDuckGo-Favicons-Bot" | "facebookcatalog" | "facebookexternalhit" | "Facebot" | "gooblog" | "ichiro" | "Sogou blog" | "Sogou inst spider" | "Sogou News Spider" | "Sogou Orion spider" | "Sogou spider2" | "Sogou web spider" ...
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): { 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 | { host?: string | boolean | undefined; sitemap?: string | boolean | string[] | undefined; policy?: { userAgent?: "360Spider" | "360Spider-Image" | "360Spider-Video" | "HaoSouSpider" | "AdsBot-Google" | "AdsBot-Google-Mobile" | "AdsBot-Google-Mobile-Apps" | "Googlebot" | "Googlebot-Image" | "Googlebot-Mobile" | "Googlebot-News" | "Googlebot-Video" | "Mediapartners-Google" | "adidxbot" | "bingbot" | "BingPreview" | "MicrosoftPreview" | "msnbot" | "msnbot-media" | "Applebot" | "AppleNewsBot" | "Baiduspider" | "Baiduspider-image" | "Baiduspider-mobile" | "Baiduspider-news" | "Baiduspider-video" | "coccoc" | "coccocbot-image" | "coccocbot-web" | "DuckDuckBot" | "DuckDuckGo-Favicons-Bot" | "facebookcatalog" | "facebookexternalhit" | "Facebot" | "gooblog" | "ichiro" | "Sogou blog" | "Sogou inst spider" | "Sogou News Spider" | "Sogou Orion spider" | "Sogou spider2" | "Sogou web spider" ...
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', },})
locale
Section titled “locale”locale
allows setting Locale specific settings
features
Section titled “features”features
is an object that allows adjusting the StudioCMS Dashboard features