Skip to content

Features

StudioCMS Integration config options schema reference

studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {},
});

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.

studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.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" | "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" | "*")[] | undefined;
allow?: string | string[] | undefined;
disallow?: string | string[] | undefined;
crawlDelay?: number | undefined;
cleanParam?: string | string[] | undefined;
}[] | undefined;
}

Allows the user to enable/disable the use of the StudioCMS Custom astro-robots-txt Integration

@defaultrobotsTXT: { policy: [ { userAgent: ['*'], allow: ['/'], disallow: ['/dashboard/'] } ] }

robotsTXT
: {
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" | "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" | "*")[] | undefined;
allow?: string | string[] | undefined;
disallow?: string | string[] | undefined;
crawlDelay?: number | undefined;
cleanParam?: string | string[] | undefined;
}[] | 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" | ... 49 more ... | undefined
userAgent
: ['*'],
allow?: string | string[] | undefined
allow
: ['/'],
disallow?: string | string[] | undefined
disallow
: ['/dashboard/'],
}
]
}
}
})

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
studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.injectQuickActionsMenu?: boolean

Enable Quick Actions Menu - Whether to enable the quick actions menu which allows easy access to your dashboard while logged in on non-dashboard pages.

@defaulttrue

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.

studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.sdk?: StudioCMS_SDKOptions

SDKSchema is a Zod schema that validates the SDK configuration. It 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.

If it is an object, it must contain the cacheConfig property which is validated by the SDKCacheSchema.

sdk
: {}
}
})

cacheConfig is an object that is used to configure the cache for the SDK.

  • Type: boolean | { lifetime?: string | undefined; } | undefined
  • Default: { lifetime: '5m' }
studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.sdk?: StudioCMS_SDKOptions

SDKSchema is a Zod schema that validates the SDK configuration. It 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.

If it is an object, it must contain the cacheConfig property which is validated by the SDKCacheSchema.

sdk
: {
// DEFAULT - This uses the default cache configuration.
cacheConfig?: boolean | {
lifetime?: string | undefined;
} | undefined

Cache Configuration

@defaultcacheConfig: { lifetime: '5m' }

cacheConfig
: {
lifetime?: string | undefined

Cache Lifetime

{number}{unit} - e.g. '5m' for 5 minutes or '1h' for 1 hour

@default'5m'

lifetime
: '5m',
},
}
}
})

dashboardConfig allows customization of the Dashboard Configuration

studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.dashboardConfig?: DashboardConfig

Allows customization of the Dashboard Configuration

dashboardConfig
: {}
}
})

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

studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.dashboardConfig?: DashboardConfig

Allows customization of the Dashboard Configuration

dashboardConfig
: {
DashboardConfig.dashboardEnabled?: boolean

OPTIONAL - This allows the user to enable or disable the Astro 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

@defaulttrue

dashboardEnabled
: true,
}
}
})

inject404Route allows the user to enable or disable the default 404 route for the dashboard

studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.dashboardConfig?: DashboardConfig

Allows customization of the Dashboard Configuration

dashboardConfig
: {
DashboardConfig.inject404Route?: boolean

OPTIONAL - This allows the user to enable or disable the default 404 route for the dashboard

@defaulttrue

inject404Route
: true,
}
}
})

faviconURL allows the user to override the default Favicon URL to a custom URL

studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.dashboardConfig?: DashboardConfig

Allows customization of the Dashboard Configuration

dashboardConfig
: {
DashboardConfig.faviconURL?: string

OPTIONAL - This allows the user to override the default Favicon URL to a custom URL

faviconURL
: '/favicon.svg',
}
}
})

dashboardRouteOverride allows the user to change the base route at which the dashboard is served (e.g., /admin instead of /dashboard)

studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.dashboardConfig?: DashboardConfig

Allows customization of the Dashboard Configuration

dashboardConfig
: {
DashboardConfig.dashboardRouteOverride?: string

OPTIONAL - This allows the user to override the default dashboard route to a custom route

Note: Use with caution, this is an advanced feature

@default"dashboard"

dashboardRouteOverride
: 'dashboard',
}
}
})

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.

studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.dashboardConfig?: DashboardConfig

Allows customization of the Dashboard Configuration

dashboardConfig
: {
DashboardConfig.versionCheck?: boolean

OPTIONAL - This 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.

@defaulttrue

versionCheck
: true,
}
}
})

security Allows customization of the Security Configuration

studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.dashboardConfig?: DashboardConfig

Allows customization of the Dashboard Configuration

dashboardConfig
: {
DashboardConfig.security?: {
hideGeneratorTags?: boolean;
}

OPTIONAL - This allows the user to configure security settings for the dashboard

security
: {}
}
}
})

hideGeneratorTags Allows enabling or disabling of the Generator Meta Tags in the Dashboard HTML

  • Type: boolean
  • Default: false
studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.dashboardConfig?: DashboardConfig

Allows customization of the Dashboard Configuration

dashboardConfig
: {
DashboardConfig.security?: {
hideGeneratorTags?: boolean;
}

OPTIONAL - This allows the user to configure security settings for the dashboard

security
: {
hideGeneratorTags?: boolean

OPTIONAL - This allows the user to hide generator tags in the HTML output of the dashboard

@defaultfalse

hideGeneratorTags
: false
}
}
}
})

authConfig Allows customization of the Authentication Configuration

studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.authConfig?: AuthConfig

Auth Configuration - Allows customization of the Authentication Configuration

authConfig
: {}
}
})

Allows enabling or disabling of the Authentication Configuration

  • Type: boolean
  • Default: true
studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.authConfig?: AuthConfig

Auth Configuration - Allows customization of the Authentication Configuration

authConfig
: {
AuthConfig.enabled?: boolean

Auth Enabled - Allows enabling or disabling of the Authentication Configuration

@defaulttrue

enabled
: true
}
}
})

Allows enabling or disabling of the Authentication Providers

The following provider can be configured from here: usernameAndPassword.

studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.authConfig?: AuthConfig

Auth Configuration - Allows customization of the Authentication Configuration

authConfig
: {
AuthConfig.providers?: {
usernameAndPassword?: boolean;
usernameAndPasswordConfig?: {
allowUserRegistration?: boolean;
};
}

Auth Providers - Allows enabling or disabling of the Authentication Providers

providers
: {
usernameAndPassword?: boolean

Username and Password Auth Provider

usernameAndPassword
: true,
usernameAndPasswordConfig?: {
allowUserRegistration?: boolean;
}

Username and Password Auth Provider Configuration

usernameAndPasswordConfig
: {
allowUserRegistration?: boolean

Allow User Registration - Allows users to register an account

@defaulttrue

allowUserRegistration
: true
}
}
}
}
})

developerConfig Allows customization of the Developer Options

studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.developerConfig?: DeveloperConfig

Developer Options/Configuration

developerConfig
: {}
}
})

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.

studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.developerConfig?: DeveloperConfig

Developer Options/Configuration

developerConfig
: {
DeveloperConfig.demoMode?: false | {
username: string;
password: string;
}

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.

@defaultfalse

@example

{
demoMode: {
username: "demo_user",
password: "some-demo-password"
}
}

demoMode
: {
username: string
username
: 'foo',
password: string
password
: 'bar'
}
}
}
})

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
studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.preferredImageService?: string

Set the identifier of the Preferred Image Service

Requires an Image Service to be installed such as 'cloudinary-js'

preferredImageService
: 'cloudinary-js'
}
})

webVitals Allows enabling or disabling of Web Vitals tracking

  • Type: boolean
  • Default: false
studiocms.config.mjs
export default
function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptions

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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms/config';
export default defineStudioCMSConfig({
dbStartPage: true,
// ...Other Options
})

defineStudioCMSConfig
({
StudioCMSOptions.features?: FeaturesConfig

Allows adjusting the StudioCMS Dashboard features

features
: {
FeaturesConfig.webVitals?: boolean

Enable Web Vitals Collection and Dashboard

@defaultfalse

webVitals
: true
}
})