The StudioCMS config file is used to configure various aspects of StudioCMS in your Astro project. It allows you to define settings such as database configuration, plugins, component registry, localization, and feature flags.
StudioCMS is an open-source headless CMS built for Astro, by members of the Astro community.
To configure StudioCMS, create a studiocms.config.* file in the root of your Astro project.
Then, import the defineStudioCMSConfig function from studiocms/config and export the configuration as the default export.
Note: Supported config file extensions are .ts, .js, .mts, and .mjs.
Your final, deployed URL. Astro uses this full URL to generate your sitemap and canonical URLs in your final build. It is strongly recommended that you set this configuration to get the most out of Astro.
Deploy to your favorite server, serverless, or edge host with build adapters. Import one of our first-party adapters (Cloudflare, Netlify, Node.js, Vercel) or explore community adapters to enable on-demand rendering in your Astro project.
Extend Astro with custom integrations. Integrations are your one-stop-shop for adding framework support (like Solid.js), new features (like sitemaps), and new libraries (like Partytown).
Read our Integrations Guide for help getting started with Astro Integrations.
importreactfrom'@astrojs/react';
importmdxfrom'@astrojs/mdx';
{
// Example: Add React + MDX support to Astro
integrations: [react(), mdx()]
}
integrations:[
functionstudioCMS(): AstroIntegration
StudioCMS Integration
StudioCMS is an open-source headless CMS built for Astro, by members of the Astro community.
To configure StudioCMS, create a studiocms.config.* file in the root of your Astro project.
Then, import the defineStudioCMSConfig function from studiocms/config and export the configuration as the default export.
Note: Supported config file extensions are .ts, .js, .mts, and .mjs.
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.
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.