Hay dos formas de configurar la integración de StudioCMS. A continuación se muestran ejemplos de cómo configurar según si eliges usar el archivo astro.config.mjs o el archivo dedicado studiocms.config.mjs.
Esta página te muestra cómo y dónde definir la configuración de StudioCMS. Para más información sobre las opciones de configuración de StudioCMS, consulta las páginas de referencia.
Usando el archivo astro.config.mjs: (opción recomendada)
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.
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.
Este archivo será detectado automáticamente y sobrescribirá cualquier opción pasada en tu astro.config. Si eliges usar esta opción, asegúrate de mover todas las opciones de configuración de StudioCMS a este archivo como se muestra a continuación:
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.
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.