| i18nReady | true | ||||
|---|---|---|---|---|---|
| title | Features | ||||
| description | Reference page for StudioCMSOptions features | ||||
| sidebar |
|
||||
| tableOfContents |
|
StudioCMS Integration config options schema reference
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
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.
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
robotsTXT: {
policy: [
{
userAgent: ['*'],
allow: ['/'],
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
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
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.
import { defineStudioCMSConfig } from 'studiocms/config';
import { Duration } from 'effect';
// ---cut---
export default defineStudioCMSConfig({
features: {
sdk: {
cacheConfig: {
lifetime: Duration.minutes(5),
},
}
}
})cacheConfig is an object that is used to configure the cache for the SDK.
- Type:
boolean|{ lifetime?: Duration | undefined; }|undefined - Default:
{ lifetime: Duration.minutes(5) }
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
import { Duration } from 'effect';
export default defineStudioCMSConfig({
features: {
sdk: {
// DEFAULT - This uses the default cache configuration.
cacheConfig: {
lifetime: Duration.minutes(5),
},
}
}
})dashboardConfig allows customization of the Dashboard Configuration
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
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
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
dashboardConfig: {
dashboardEnabled: true,
}
}
})inject404Route allows the user to enable or disable the default 404 route for the dashboard
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
dashboardConfig: {
inject404Route: true,
}
}
})faviconURL allows the user to override the default Favicon URL to a custom URL
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
dashboardConfig: {
faviconURL: '/favicon.svg',
}
}
})dashboardRouteOverride allows the user to change the base route at which the dashboard is served (e.g., /admin instead of /dashboard)
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
dashboardConfig: {
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.
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
dashboardConfig: {
versionCheck: true,
}
}
})security Allows customization of the Security Configuration
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
dashboardConfig: {
security: {}
}
}
})hideGeneratorTags Allows enabling or disabling of the Generator Meta Tags in the Dashboard HTML
- Type:
boolean - Default:
false
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
dashboardConfig: {
security: {
hideGeneratorTags: false
}
}
}
})authConfig Allows customization of the Authentication Configuration
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
authConfig: {}
}
})Allows enabling or disabling of the Authentication Configuration
- Type:
boolean - Default:
true
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
authConfig: {
enabled: true
}
}
})Allows enabling or disabling of the Authentication Providers
The following provider can be configured from here: usernameAndPassword.
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
authConfig: {
providers: {
usernameAndPassword: true,
usernameAndPasswordConfig: {
allowUserRegistration: true
}
}
}
}
})developerConfig Allows customization of the Developer Options
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
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.
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
developerConfig: {
demoMode: {
username: 'foo',
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
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
preferredImageService: 'cloudinary-js'
}
})webVitals Allows enabling or disabling of Web Vitals tracking
- Type:
boolean - Default:
false
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
webVitals: true
}
})api allows configuring API specific features
- Type:
ApiConfig|undefined - Default:
undefined
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
api: {
// api specific features here
}
}
})apiDocs allows enabling or disabling of the API Docs route which provides an OpenAPI Spec for the StudioCMS API
- Type:
boolean - Default:
true
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
features: {
api: {
apiDocs: true
}
}
})