esbuild plugin for markdown files using Markdoc.

How to use the plugin

The goal of this plugin is to convert .md files into the content object expected by Markdoc render functions.

  1. Add to your esbuild plugins array.

import markdocPlugin from "esbuild-markdoc-plugin";

config = {
  plugins: [
  1. All files with .md extention will be parsed with Markdoc, and transformed into the content json object for Markdoc renderers.

import Markdoc from '@markdoc/markdoc';
import content from './';

const html = Markdoc.renderers.html(content);

Custom Config

You can pass a custom config object to markdocPlugin(config).


I wanted this for my own project so I built this plugin. I figured other people might want to use it as well so here it is.

Please file issues or open PRs and I will try to address them quickly.


View Github