Skip to content

@studiocms/md

This plugin enables MD Support within StudioCMS.

  1. Install the package using the following command:

    Terminal window
    npm run studiocms add @studiocms/md
  2. Your StudioCMS config should now include @studiocms/md:

    studiocms.config.mjs
    import { defineStudioCMSConfig } from 'studiocms/config';
    import md from '@studiocms/md';
    export default defineStudioCMSConfig({
    plugins: [
    md(),
    ],
    });
type StudioCMSMarkdown = {
flavor: "studiocms";
autoLinkHeadings: boolean;
callouts: false | "github" | "obsidian" | "vitepress";
discordSubtext: boolean;
sanitize: {
allowAttributes: Record<string, string[]>;
allowComments: boolean;
allowComponents: boolean;
allowCustomElements: boolean;
allowElements: string[];
blockElements: string[];
dropAttributes: Record<string, string[]>;
dropElements: string[];
};
};
type AstroMarkdown = {
flavor: "astro";
sanitize: {
allowAttributes: Record<string, string[]>;
allowComments: boolean;
allowComponents: boolean;
allowCustomElements: boolean;
allowElements: string[];
blockElements: string[];
dropAttributes: Record<string, string[]>;
dropElements: string[];
};
};