mdx-paper
mdx-paper copied to clipboard
React components and webpack configuration for writing an article with MDX
trafficstars
mdx-paper
Write an article using Markdown and React components (MDX).
Install
npm install mdx-paper
Usage
- Write your article in
article.mdx. - Import React components from
mdx-paperor elsewhere. - Add the article's metadata to
metadata.yml. - Run
npx mdx-paperto start a web server and view the article. - Run
npx mdx-paper buildto build the article for deployment, in thedistfolder.
References
- Add a references file as either BibTex, CiteProc JSON or CiteProc YML and use e.g.
--references references.bibto specify the path. - Specify a CSL citation style with
--citation-style, e.g.--citation-style nature. - Use
import { Bibliography } from 'mdx-paper'and place<Bibliography/>where you'd like the reference list to appear.
Publishing
- To automatically build and deploy the article to Vercel either connect the Vercel for GitHub application or run
vercellocally.