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';
exportdefaultdefineStudioCMSConfig({
dbStartPage:true,
contentRenderer:'marked',
verbose:true,
dateLocale:'en-us',
// ...Other Options
})
defineStudioCMSConfig({
defaultFrontEndConfig:{
Error ts(2353) ― Object literal may only specify known properties, and 'defaultFrontEndConfig' does not exist in type '{ plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<...> | undefined; locale?: { ...; } | undefined; features?: { ...; } | undefined; }'.
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';
exportdefaultdefineStudioCMSConfig({
dbStartPage:true,
contentRenderer:'marked',
verbose:true,
dateLocale:'en-us',
// ...Other Options
})
defineStudioCMSConfig({
defaultFrontEndConfig:{
Error ts(2353) ― Object literal may only specify known properties, and 'defaultFrontEndConfig' does not exist in type '{ plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<...> | undefined; locale?: { ...; } | undefined; features?: { ...; } | undefined; }'.
favicon: string
favicon:'/favicon.svg', // PREDETERMINADO - Esto utiliza el favicon predeterminado.
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';
exportdefaultdefineStudioCMSConfig({
dbStartPage:true,
contentRenderer:'marked',
verbose:true,
dateLocale:'en-us',
// ...Other Options
})
defineStudioCMSConfig({
defaultFrontEndConfig:{
Error ts(2353) ― Object literal may only specify known properties, and 'defaultFrontEndConfig' does not exist in type '{ plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<...> | undefined; locale?: { ...; } | undefined; features?: { ...; } | undefined; }'.
htmlDefaultLanguage: string
htmlDefaultLanguage:'en', // PREDETERMINADO - Esto utiliza el idioma predeterminado.
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';
exportdefaultdefineStudioCMSConfig({
dbStartPage:true,
contentRenderer:'marked',
verbose:true,
dateLocale:'en-us',
// ...Other Options
})
defineStudioCMSConfig({
defaultFrontEndConfig:{
Error ts(2353) ― Object literal may only specify known properties, and 'defaultFrontEndConfig' does not exist in type '{ plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<...> | undefined; locale?: { ...; } | undefined; features?: { ...; } | undefined; }'.
htmlDefaultHead: {
tag: string;
attrs: {
src: string;
'data-site': string;
defer: boolean;
};
}[]
htmlDefaultHead:[
// Ejemplo: añadir etiqueta de script de análisis Fathom.
{
tag: string
tag:'script',
attrs: {
src: string;
'data-site': string;
defer: boolean;
}
attrs:{
src: string
src:'https://cdn.usefathom.com/script.js',
'data-site':'MI-ID-FATHOM',
defer: boolean
defer:true,
},
},
],
},
});
Las entradas en head se convierten directamente en elementos HTML y no pasan por el procesamiento de script^ o style^ de Astro.
Inyecta una interfaz de usuario para acciones rápidas en la esquina inferior derecha del sitio principal, permitiendo a los usuarios navegar rápidamente a la interfaz de administración de StudioCMS.
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';
exportdefaultdefineStudioCMSConfig({
dbStartPage:true,
contentRenderer:'marked',
verbose:true,
dateLocale:'en-us',
// ...Other Options
})
defineStudioCMSConfig({
defaultFrontEndConfig:{
Error ts(2353) ― Object literal may only specify known properties, and 'defaultFrontEndConfig' does not exist in type '{ plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<...> | undefined; locale?: { ...; } | undefined; features?: { ...; } | undefined; }'.
injectQuickActionsMenu: boolean
injectQuickActionsMenu:true, // PREDETERMINADO - Esto inyecta el menú de acciones rápidas.