Use React Components with Markdown in Parcel with MDXC.
Plugin originally forked and modified from parcel-plugin-markdown.
Not sure why I didn't just use https://github.com/hamlim/parcel-plugin-mdx. Oh well.
yarn add --dev parcel-plugin-mdxc
import React from "react";
import { render } from "react-dom";
import Document from "./Markdown.md";
render(<Document />, document.querySelector("#root"));
[https://github.com/jamesknelson/mdxc#api](MDXC config)
// package.json
// If you want to pass options to mdxc
{
"name": "ABC",
"mdxc": {
"linkify": true,
"typographer": true
}
}
This plugin also supports config in .mdxcrc, mdxc.config.js.
git clone https://github.com/ifyoumakeit/parcel-plugin-mdxc
cd parcel-plugin-mdxc
yarn
cd examples
yarn
yarn start
Run with Jest.
yarn test
- Add image support