Skip to content

Dashboard Configuration

StudioCMS Integration config options schema reference

studiocms.config.mjs
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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms';
export default defineStudioCMSConfig({
dbStartPage: true,
contentRenderer: 'marked',
verbose: true,
dateLocale: 'en-us',
// ...Other Options
})

defineStudioCMSConfig
({
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
: {
dashboardEnabled?: boolean | undefined
dashboardEnabled
: true,
dashboardRouteOverride?: string | undefined
dashboardRouteOverride
: 'dashboard',
developerConfig?: {
demoMode?: false | {
password: string;
username: string;
} | undefined;
} | undefined
developerConfig
: {},
faviconURL?: string | undefined
faviconURL
: '/favicon.svg',
inject404Route?: boolean | undefined
inject404Route
: true,
versionCheck?: boolean | undefined
versionCheck
: true,
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
AuthConfig
: {},
},
});

dashboardEnabled is a boolean that is used to determine if the dashboard is enabled.

  • Type: boolean
  • Default: true
studiocms.config.mjs
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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms';
export default defineStudioCMSConfig({
dbStartPage: true,
contentRenderer: 'marked',
verbose: true,
dateLocale: 'en-us',
// ...Other Options
})

defineStudioCMSConfig
({
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
: {
dashboardEnabled?: boolean | undefined
dashboardEnabled
: true, // DEFAULT - This enables the dashboard.
}
})

DashboardRouteOverride is a string that is used to determine the route for the dashboard.

  • Type: string
  • Default: 'dashboard'
studiocms.config.mjs
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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms';
export default defineStudioCMSConfig({
dbStartPage: true,
contentRenderer: 'marked',
verbose: true,
dateLocale: 'en-us',
// ...Other Options
})

defineStudioCMSConfig
({
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
: {
dashboardRouteOverride?: string | undefined
dashboardRouteOverride
: 'dashboard', // DEFAULT - This sets the dashboard route to /dashboard.
}
})

developerConfig is an object that is used to configure the developer settings for the dashboard.

studiocms.config.mjs
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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms';
export default defineStudioCMSConfig({
dbStartPage: true,
contentRenderer: 'marked',
verbose: true,
dateLocale: 'en-us',
// ...Other Options
})

defineStudioCMSConfig
({
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
: {
developerConfig?: {
demoMode?: false | {
password: string;
username: string;
} | undefined;
} | undefined
developerConfig
: {
demoMode?: false | {
password: string;
username: string;
} | undefined
demoMode
: false, // DEFAULT - This disables demo mode.
},
}
})

faviconURL is a string that is used to determine the path to the favicon for the dashboard.

  • Type: string
  • Default: '/favicon.svg'
studiocms.config.mjs
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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms';
export default defineStudioCMSConfig({
dbStartPage: true,
contentRenderer: 'marked',
verbose: true,
dateLocale: 'en-us',
// ...Other Options
})

defineStudioCMSConfig
({
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
: {
faviconURL?: string | undefined
faviconURL
: '/favicon.svg', // DEFAULT - This sets the favicon for the dashboard.
}
})

inject404Route is a boolean that is used to determine if the 404 route should be injected.

  • Type: boolean
  • Default: true
studiocms.config.mjs
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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms';
export default defineStudioCMSConfig({
dbStartPage: true,
contentRenderer: 'marked',
verbose: true,
dateLocale: 'en-us',
// ...Other Options
})

defineStudioCMSConfig
({
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
: {
inject404Route?: boolean | undefined
inject404Route
: true, // DEFAULT - This injects the 404 route.
}
})

versionCheck is a boolean that is used to determine if version checking should be enabled.

  • Type: boolean
  • Default: true
studiocms.config.mjs
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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms';
export default defineStudioCMSConfig({
dbStartPage: true,
contentRenderer: 'marked',
verbose: true,
dateLocale: 'en-us',
// ...Other Options
})

defineStudioCMSConfig
({
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
: {
versionCheck?: boolean | undefined
versionCheck
: true, // DEFAULT - This enables version checking.
}
})

AuthConfig is an object that is used to configure the authentication settings for the dashboard.

studiocms.config.mjs
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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms';
export default defineStudioCMSConfig({
dbStartPage: true,
contentRenderer: 'marked',
verbose: true,
dateLocale: 'en-us',
// ...Other Options
})

defineStudioCMSConfig
({
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
: {
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
AuthConfig
: {
enabled?: boolean | undefined
enabled
: true, // DEFAULT - This enables authentication.
},
}
})

providers is an object that is used to configure the authentication providers for the dashboard.

studiocms.config.mjs
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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms';
export default defineStudioCMSConfig({
dbStartPage: true,
contentRenderer: 'marked',
verbose: true,
dateLocale: 'en-us',
// ...Other Options
})

defineStudioCMSConfig
({
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
: {
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
AuthConfig
: {
providers?: {
github?: boolean | undefined;
discord?: boolean | undefined;
google?: boolean | undefined;
auth0?: boolean | undefined;
usernameAndPassword?: boolean | undefined;
usernameAndPasswordConfig?: {
allowUserRegistration?: boolean | undefined;
} | undefined;
} | undefined
providers
: {
google?: boolean | undefined
google
: true,
github?: boolean | undefined
github
: true,
discord?: boolean | undefined
discord
: true,
auth0?: boolean | undefined
auth0
: true,
usernameAndPassword?: boolean | undefined
usernameAndPassword
: true,
usernameAndPasswordConfig?: {
allowUserRegistration?: boolean | undefined;
} | undefined
usernameAndPasswordConfig
: {},
},
},
},
})

usernameAndPasswordConfig is an object that is used to configure the username and password settings for the dashboard.

  • Type: { allowUserRegistration?: boolean }
  • Default: {}
studiocms.config.mjs
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.

@example

// studiocms.config.mjs
import { defineStudioCMSConfig } from 'studiocms';
export default defineStudioCMSConfig({
dbStartPage: true,
contentRenderer: 'marked',
verbose: true,
dateLocale: 'en-us',
// ...Other Options
})

defineStudioCMSConfig
({
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
: {
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
AuthConfig
: {
providers?: {
github?: boolean | undefined;
discord?: boolean | undefined;
google?: boolean | undefined;
auth0?: boolean | undefined;
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, // DEFAULT - This allows user registration.
},
},
},
},
})
type AuthProviders: {
github?: boolean | undefined;
discord?: boolean | undefined;
google?: boolean | undefined;
auth0?: boolean | undefined;
usernameAndPassword?: boolean | undefined;
usernameAndPasswordConfig?: {
allowUserRegistration?: boolean | undefined;
} | undefined;
} | undefined