@studiocms/markdoc
Introducción
Sección titulada «Introducción»Este complemento habilita el soporte de MarkDoc dentro de StudioCMS.
Este complemento requiere el complemento @studiocms/md.
Instalación
Sección titulada «Instalación»-
Instala el paquete usando el siguiente comando:
Ventana de terminal npm run studiocms add @studiocms/markdocVentana de terminal pnpm run studiocms add @studiocms/markdocVentana de terminal yarn run studiocms add @studiocms/markdoc -
La configuración de StudioCMS debería incluir
@studiocms/markdoc:studiocms.config.mjs import {defineStudioCMSConfig } from 'studiocms/config';function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptionsA 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'sastro.config.mjsfile.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.
importmarkdoc from '@studiocms/markdoc';function markdoc(options?: MarkDocPluginOptions): StudioCMSPluginexport defaultdefineStudioCMSConfig({function defineStudioCMSConfig(config: StudioCMSOptions): StudioCMSOptionsA 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'sastro.config.mjsfile.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.
plugins: [StudioCMSOptions.plugins?: StudioCMSPlugin[]Add Plugins to the StudioCMS
markdoc(),function markdoc(options?: MarkDocPluginOptions): StudioCMSPlugin],});