@studiocms/mdx
Version:
Add MDX Support to your StudioCMS project with ease!
39 lines (38 loc) • 1.54 kB
TypeScript
/**
* These triple-slash directives defines dependencies to various declaration files that will be
* loaded when a user imports the StudioCMS plugin in their Astro configuration file. These
* directives must be first at the top of the file and can only be preceded by this comment.
*/
/// <reference types="./virtual.d.ts" preserve="true" />
import type { AstroIntegration } from 'astro';
import { type StudioCMSPlugin } from 'studiocms/plugins';
import type { MDXPluginOptions } from './types.js';
/**
* Creates an internal Astro integration for MDX functionality.
* This is used by the StudioCMS plugin and can be used directly in tests.
*
* @param {string} packageIdentifier - The package identifier for the integration.
* @param {MDXPluginOptions} [options] - Optional configuration options for the MDX plugin.
* @returns {AstroIntegration} The configured Astro integration.
*/
export declare function internalMDXIntegration(packageIdentifier: string, options?: MDXPluginOptions): AstroIntegration;
/**
* Creates and configures the StudioCMS MDX plugin.
*
* @param {MDXPluginOptions} [options] - Optional configuration options for the MDX plugin.
* @returns {StudioCMSPlugin} The configured StudioCMS plugin.
*
* @example
* ```typescript
* plugins: [
* studiocmsMDX({
* remarkPlugins: [],
* rehypePlugins: [],
* recmaPlugins: [],
* remarkRehypeOptions: {}
* }),
* ]
* ```
*/
export declare function studiocmsMDX(options?: MDXPluginOptions): StudioCMSPlugin;
export default studiocmsMDX;