https://github.com/ifyoumakeit/parcel-plugin-mdxc
https://github.com/ifyoumakeit/parcel-plugin-mdxc
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ifyoumakeit/parcel-plugin-mdxc
- Owner: ifyoumakeit
- Created: 2018-06-30T04:58:09.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-30T22:38:49.000Z (almost 8 years ago)
- Last Synced: 2025-03-06T01:11:50.170Z (about 1 year ago)
- Language: JavaScript
- Size: 189 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Parcel plugin for MDXC
Use React Components with Markdown in Parcel with [MDXC](https://github.com/jamesknelson/mdxc).
Plugin originally forked and modified from [parcel-plugin-markdown](https://github.com/gongpeione/parcel-plugin-markdown).
Not sure why I didn't just use [https://github.com/hamlim/parcel-plugin-mdx](https://github.com/hamlim/parcel-plugin-mdx). Oh well.
## Usage
```
yarn add --dev parcel-plugin-mdxc
```
```jsx
import React from "react";
import { render } from "react-dom";
import Document from "./Markdown.md";
render(, document.querySelector("#root"));
```
## Config
[https://github.com/jamesknelson/mdxc#api](MDXC config)
```json
// 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.
## Example
```bash
git clone https://github.com/ifyoumakeit/parcel-plugin-mdxc
cd parcel-plugin-mdxc
yarn
cd examples
yarn
yarn start
```
## Tests
Run with Jest.
```bash
yarn test
```
## TODO
- [ ] Add image support