# @studiocms/markdoc

> Add MarkDoc Support to your StudioCMS project with ease!

Latest version **0.4.0** (published 2026-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @studiocms/markdoc
pnpm add @studiocms/markdoc
yarn add @studiocms/markdoc
bun add @studiocms/markdoc
```

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2026-09-24 |
| First published | 2025-03-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 4 |
| Unpacked size | 12 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 835 |
| Author | withstudiocms |
| Maintainers | adammatthiesen, dreyfus92, code.spirit |
| Keywords | astro, astrocms, astrodb, astrostudio, astro-studio, astro-studiocms, cms, studiocms, plugin, studiocms-plugin |

## Links

- npm: https://www.npmjs.com/package/@studiocms/markdoc
- Repository: https://github.com/withstudiocms/studiocms
- Homepage: https://studiocms.dev
- Issues: https://github.com/withstudiocms/studiocms/issues
- npm.io page: https://npm.io/package/@studiocms/markdoc

## Dependencies (4)

- [react](https://npm.io/package/react.md) ^19.2.8
- [react-dom](https://npm.io/package/react-dom.md) ^19.2.8
- [@markdoc/markdoc](https://npm.io/package/@markdoc/markdoc.md) ^0.5.9
- [@withstudiocms/internal_helpers](https://npm.io/package/@withstudiocms/internal_helpers.md) ^0.3.0

## Recent versions

- 0.4.0 (latest) — 2026-09-24
- 0.1.0-beta.13 (beta) — 2025-03-26
- 0.3.0 — 2026-03-10
- 0.2.0 — 2026-01-27
- 0.1.1 — 2026-01-16
- 0.1.0 — 2026-01-15
- 0.1.0-beta.31 — 2025-12-17
- 0.1.0-beta.30 — 2025-11-11
- 0.1.0-beta.29 — 2025-11-09
- 0.1.0-beta.28 — 2025-10-29
- 0.1.0-beta.27 — 2025-09-27
- 0.1.0-beta.26 — 2025-09-05
- 0.1.0-beta.25 — 2025-08-25
- 0.1.0-beta.24 — 2025-08-11
- 0.1.0-beta.23 — 2025-08-02
- … 9 more at https://npm.io/package/@studiocms/markdoc/versions

## README

# @StudioCMS/MarkDoc Plugin

[![codecov](https://codecov.io/github/withstudiocms/studiocms/graph/badge.svg?token=RN8LT1O5E2&component=studiocms_markdoc)](https://codecov.io/github/withstudiocms/studiocms)

Add MarkDoc support to StudioCMS

## Usage

Add this plugin in your StudioCMS config. (`studiocms.config.mjs`)

```ts
import { defineStudioCMSConfig } from 'studiocms/config';
import markdocPlugin from '@studiocms/markdoc';

export default defineStudioCMSConfig({
    // other options here
    plugins: [markdocPlugin()]
});
```

## Options

### type
**Type:** `'html'` | `'react-static'` | [`MarkDocRenderer`](#markdocrenderer)
**Default:** `'html'`

Set the type of MarkDoc rendering that you would like to do.

### argParse
**Type:** `ParserArgs` | `undefined`

Optional Parser args for MarkDoc

### transformConfig
**Type:** `ConfigType` | `undefined`

Optional Transform config for MarkDoc

#### MarkDocRenderer
**Type:** `{ name: string; render: (content: import('@markdoc/markdoc').RenderableTreeNode) => Promise<string>; }`

Example Renderer
```ts
import type { RenderableTreeNode } from '@markdoc/markdoc';
import type { MarkDocRenderer } from '@studiocms/markdoc/types';

export const renderHTML: MarkDocRenderer = {
	name: 'html',
	render: async (content: RenderableTreeNode) => {
		return Markdoc.renderers.html(content);
	},
};
```

## License

[MIT Licensed](./LICENSE).

---
_Source: https://npm.io/package/@studiocms/markdoc · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
