Skip to content

mdx to md converter? #184

Discussion options

You must be logged in to vote

The short answer, you can render the HTML output from MDX directly to PDF (using Chrome, or a wrapper like Playwright or Puppeteer), no need to go through pandoc first.

If you really want to go through pandoc, writing an MDX converter still probably doesn't make sense.

A few examples to illustrate why:

  1. Pandoc can render HTML to PDF, and could be used as an alternative to the browser based converting solutions noted above. Though it may lose more of the intended formatting than a browser would.
  2. If you use MDX for markdown without any JSX, in this case content already is valid markdown, no converter is needed
  3. If you use MDX for markdown with intrinsic JSX (html tags) only, in this case con…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@deadcoder0904
Comment options

@deadcoder0904
Comment options

Answer selected by deadcoder0904
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants