Configuración del Frontend Predeterminado
Referencia del esquema de opciones de configuración de la integración de StudioCMS
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | { host?: string | boolean | undefined; sitemap?: string | boolean | string[] | undefined; policy?: { userAgent?: "360Spider" | "360Spider-Image" | "360Spider-Video" | "HaoSouSpider" | "AdsBot-Google" | "AdsBot-Google-Mobile" | "AdsBot-Google-Mobile-Apps" | "Googlebot" | "Googlebot-Image" | "Googlebot-Mobile" | "Googlebot-News" | "Googlebot-Video" | "Mediapartners-Google" | "adidxbot" | "bingbot" | "BingPreview" | "MicrosoftPreview" | "msnbot" | "msnbot-media" | "Applebot" | "AppleNewsBot" | "Baiduspider" | "Baiduspider-image" | "Baiduspider-mobile" | "Baiduspider-news" | "Baiduspider-video" | "coccoc" | "coccocbot-image" | "coccocbot-web" | "DuckDuckBot" | "DuckDuckGo-Favicons-Bot" | "facebookcatalog" | "facebookexternalhit" | "Facebot" | "gooblog" | "ichiro" | "Sogou blog" | "Sogou inst spider" | "Sogou News Spider" | "Sogou Orion spider" | "Sogou spider2" | "Sogou web spider" ...
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.
defineStudioCMSConfig({ defaultFrontEndConfig: {Error ts(2353) ― favicon: string
favicon: '/favicon.svg', htmlDefaultLanguage: string
htmlDefaultLanguage: 'en', htmlDefaultHead: never[]
htmlDefaultHead: [], injectQuickActionsMenu: boolean
injectQuickActionsMenu: true, },});
favicon
Sección titulada «favicon»favicon
es una cadena que se utiliza para determinar la ruta al favicon para el sitio.
- Tipo:
string
- Valor predeterminado:
'/favicon.svg'
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | { host?: string | boolean | undefined; sitemap?: string | boolean | string[] | undefined; policy?: { userAgent?: "360Spider" | "360Spider-Image" | "360Spider-Video" | "HaoSouSpider" | "AdsBot-Google" | "AdsBot-Google-Mobile" | "AdsBot-Google-Mobile-Apps" | "Googlebot" | "Googlebot-Image" | "Googlebot-Mobile" | "Googlebot-News" | "Googlebot-Video" | "Mediapartners-Google" | "adidxbot" | "bingbot" | "BingPreview" | "MicrosoftPreview" | "msnbot" | "msnbot-media" | "Applebot" | "AppleNewsBot" | "Baiduspider" | "Baiduspider-image" | "Baiduspider-mobile" | "Baiduspider-news" | "Baiduspider-video" | "coccoc" | "coccocbot-image" | "coccocbot-web" | "DuckDuckBot" | "DuckDuckGo-Favicons-Bot" | "facebookcatalog" | "facebookexternalhit" | "Facebot" | "gooblog" | "ichiro" | "Sogou blog" | "Sogou inst spider" | "Sogou News Spider" | "Sogou Orion spider" | "Sogou spider2" | "Sogou web spider" ...
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.
defineStudioCMSConfig({ defaultFrontEndConfig: {Error ts(2353) ― favicon: string
favicon: '/favicon.svg', // PREDETERMINADO - Esto utiliza el favicon predeterminado. }})
htmlDefaultLanguage
Sección titulada «htmlDefaultLanguage»htmlDefaultLanguage
es una cadena que se utiliza para determinar el idioma predeterminado para el sitio.
- Tipo:
string
- Por defecto:
'en'
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | { host?: string | boolean | undefined; sitemap?: string | boolean | string[] | undefined; policy?: { userAgent?: "360Spider" | "360Spider-Image" | "360Spider-Video" | "HaoSouSpider" | "AdsBot-Google" | "AdsBot-Google-Mobile" | "AdsBot-Google-Mobile-Apps" | "Googlebot" | "Googlebot-Image" | "Googlebot-Mobile" | "Googlebot-News" | "Googlebot-Video" | "Mediapartners-Google" | "adidxbot" | "bingbot" | "BingPreview" | "MicrosoftPreview" | "msnbot" | "msnbot-media" | "Applebot" | "AppleNewsBot" | "Baiduspider" | "Baiduspider-image" | "Baiduspider-mobile" | "Baiduspider-news" | "Baiduspider-video" | "coccoc" | "coccocbot-image" | "coccocbot-web" | "DuckDuckBot" | "DuckDuckGo-Favicons-Bot" | "facebookcatalog" | "facebookexternalhit" | "Facebot" | "gooblog" | "ichiro" | "Sogou blog" | "Sogou inst spider" | "Sogou News Spider" | "Sogou Orion spider" | "Sogou spider2" | "Sogou web spider" ...
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.
defineStudioCMSConfig({ defaultFrontEndConfig: {Error ts(2353) ― htmlDefaultLanguage: string
htmlDefaultLanguage: 'en', // PREDETERMINADO - Esto utiliza el idioma predeterminado. }})
htmlDefaultHead
Sección titulada «htmlDefaultHead»Tipo: HeadConfig[]
Añade etiquetas personalizadas al <head>
de tu sitio Starlight.
Puede ser útil para añadir análisis y otros scripts y recursos de terceros.
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | { host?: string | boolean | undefined; sitemap?: string | boolean | string[] | undefined; policy?: { userAgent?: "360Spider" | "360Spider-Image" | "360Spider-Video" | "HaoSouSpider" | "AdsBot-Google" | "AdsBot-Google-Mobile" | "AdsBot-Google-Mobile-Apps" | "Googlebot" | "Googlebot-Image" | "Googlebot-Mobile" | "Googlebot-News" | "Googlebot-Video" | "Mediapartners-Google" | "adidxbot" | "bingbot" | "BingPreview" | "MicrosoftPreview" | "msnbot" | "msnbot-media" | "Applebot" | "AppleNewsBot" | "Baiduspider" | "Baiduspider-image" | "Baiduspider-mobile" | "Baiduspider-news" | "Baiduspider-video" | "coccoc" | "coccocbot-image" | "coccocbot-web" | "DuckDuckBot" | "DuckDuckGo-Favicons-Bot" | "facebookcatalog" | "facebookexternalhit" | "Facebot" | "gooblog" | "ichiro" | "Sogou blog" | "Sogou inst spider" | "Sogou News Spider" | "Sogou Orion spider" | "Sogou spider2" | "Sogou web spider" ...
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.
defineStudioCMSConfig({ defaultFrontEndConfig: {Error ts(2353) ― 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.
HeadConfig
Sección titulada «HeadConfig»interface HeadConfig { tag: string; attrs?: Record<string, string | boolean | undefined>; content?: string;}
injectQuickActionsMenu
Sección titulada «injectQuickActionsMenu»Tipo: boolean
Por defecto: true
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.
export default function defineStudioCMSConfig(config: StudioCMSOptions): { plugins?: StudioCMSPlugin[] | undefined; logLevel?: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | undefined; dbStartPage?: boolean | undefined; verbose?: boolean | undefined; componentRegistry?: Record<string, string> | undefined; locale?: { dateLocale?: string | undefined; dateTimeFormat?: Intl.DateTimeFormatOptions | undefined; } | undefined; features?: { sdk?: boolean | { cacheConfig?: boolean | { lifetime?: string | undefined; } | undefined; } | undefined; robotsTXT?: boolean | { host?: string | boolean | undefined; sitemap?: string | boolean | string[] | undefined; policy?: { userAgent?: "360Spider" | "360Spider-Image" | "360Spider-Video" | "HaoSouSpider" | "AdsBot-Google" | "AdsBot-Google-Mobile" | "AdsBot-Google-Mobile-Apps" | "Googlebot" | "Googlebot-Image" | "Googlebot-Mobile" | "Googlebot-News" | "Googlebot-Video" | "Mediapartners-Google" | "adidxbot" | "bingbot" | "BingPreview" | "MicrosoftPreview" | "msnbot" | "msnbot-media" | "Applebot" | "AppleNewsBot" | "Baiduspider" | "Baiduspider-image" | "Baiduspider-mobile" | "Baiduspider-news" | "Baiduspider-video" | "coccoc" | "coccocbot-image" | "coccocbot-web" | "DuckDuckBot" | "DuckDuckGo-Favicons-Bot" | "facebookcatalog" | "facebookexternalhit" | "Facebot" | "gooblog" | "ichiro" | "Sogou blog" | "Sogou inst spider" | "Sogou News Spider" | "Sogou Orion spider" | "Sogou spider2" | "Sogou web spider" ...
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.
defineStudioCMSConfig({ defaultFrontEndConfig: {Error ts(2353) ― injectQuickActionsMenu: boolean
injectQuickActionsMenu: true, // PREDETERMINADO - Esto inyecta el menú de acciones rápidas. }})