Convert MDX to Markdown.

Overview

mdx-to-md

Convert MDX to Markdown.

Why?

This library is most useful for generating README.md files like the one you're reading.

Install

yarn add mdx-to-md
npm install mdx-to-md

CLI

mdx-to-md [sourcePath] [outPath]

In the simplest use case, you can run the CLI and it will output the converted Markdown relative to the current working directory the script was run in:

yarn mdx-to-md README.mdx

Node

Start with MDX:

import { name, description } from "./package.json"

# {name}

{description}

# Install

<pre>
  <code className="language-bash">yarn add {name}</code>
</pre>

And convert it to Markdown:

import { writeFile } from "fs/promises"
import { mdxToMarkdown } from "mdx-to-md"

const markdown = await mdxToMarkdown("README.mdx")
const banner = `This README was auto-generated using "yarn build:readme"`
const readme = `<!--- ${banner} --> \n\n ${markdown}`

await writeFile("README.md", readme)

console.log("📝 Converted README.mdx -> README.md")

Which outputs:

# mdx-to-md

Convert MDX to Markdown.

# Install

yarn add mdx-to-md
You might also like...

Generate rich documentation data for TypeScript and MDX codebases.

⚠️ Currently under development, not ready for use yet This library is currently unstable and the API is in flux. It is being worked on in the open for

Oct 30, 2022

MDX Deck so good you get the chills 😮‍💨

MDX Frisson MDX Deck so good you get the chills. 😮‍💨 Frisson noun: a sudden strong feeling of excitement or fear; a thrill. Features 📝 Markdown/MDX

Dec 6, 2022

The website for Assemble. Built using Next.js, Theme UI & MDX.

The website for Assemble. Built using Next.js, Theme UI & MDX.

www-assemble The website for Assemble. Built using Next.js, Theme UI & MDX.

Sep 9, 2022

My personal website – Built using Next.js, TypeScript, MDX, Sanity.io and Tailwind

kenaqshal.com Framework: Next.js Database: PlanetScale ORM: Prisma Authentication: NextAuth.js Deployment: Vercel CMS: Sanity Styling: Tailwind CSS Ov

Nov 24, 2022

📝 Vite & Mdx powered static site generator.Base on islands architecture

Island.js A static site generator for the modern web.It has following features: 🚀 Base on Vite, it has great development experience. 🏝️ Islands arch

Dec 25, 2022

Yunisdev-table2csv - Lightweight library to convert HTML table to CSV file

Installation Add following HTML before body end: script src="https://yunisdev.github.io/table2csv/table2csv.min.js"/script !-- or -- script src

Oct 19, 2020

Convert JSON to human readable HTML

json.human.js: Json Formatting for Human Beings A small library to convert a JSON object into a human readable HTML representation that is easy to sty

Dec 3, 2022

Mercury: easily convert Python notebook to web app and share with others

Mercury: easily convert Python notebook to web app and share with others

Mercury Share your Python notebooks with others Easily convert your Python notebooks into interactive web apps by adding parameters in YAML. Simply ad

Dec 30, 2022

Convert and Calculate by RPN for typescript.

Coaca.ts: Convert and Calculate by RPN for typescript 注意点 まずそもそも、typescriptはサーバサイドで使用されるべき言語です。一応typescript4.5以降の機能を用いていますが、typescriptの本来の使い方を超越してます。ご

Aug 24, 2022
Owner
Travis Arnold
Designer 🎨 Engineer 📐 Systems 🎛 React ⚛️ He/Him
Travis Arnold
Convert Your Kindle highlight & Note to Markdown/JSON

kindle-highlight-to-markdown Convert Your Kindle highlight & Note to Markdown/JSON Install Install with npm: npm install kindle-highlight-to-markdown

azu 15 Dec 31, 2022
A plugin for the Obsidian markdown note application, adding functionality to render markdown documents with multiple columns of text.

Multi-Column Markdown Take your boring markdown document and add some columns to it! With Multi Column Markdown rather than limiting your document lay

Cameron Robinson 91 Jan 2, 2023
A markdown-it plugin that process images through the eleventy-img plugin. Can be used in any projects that uses markdown-it.

markdown-it-eleventy-img A markdown-it plugin that process images through the eleventy-img plugin. Can be used in any projects that use markdown-it. F

null 25 Dec 20, 2022
An obsidian plugin for uploading local images embedded in markdown to remote store and export markdown for publishing to static site.

Obsidian Publish This plugin cloud upload all local images embedded in markdown to specified remote image store (support imgur only, currently) and ex

Addo.Zhang 7 Dec 13, 2022
Markdown Transformer. Transform markdown files to different formats

Mdtx Inspired by generative programming and weed :). So I was learning Elm language at home usually in the evening and now I am missing all this gener

Aexol 13 Jan 2, 2023
Playful and Colorful One-Page portfolio featuring Parallax effects and animations. Especially designers and/or photographers will love this theme! Built with MDX and Theme UI.

Gatsby Starter Portfolio: Cara Playful and Colorful One-Page portfolio featuring Parallax effects and animations. Using the Gatsby Theme @lekoarts/gat

prashanth s 1 Dec 24, 2021
Starter template for a personal website blog, built with Next.js, MDX, and Tailwind CSS.

nextjs-mdx-blog-theme View: demo site Framework: Next.js Deployment: Vercel Content: MDX Styling: Tailwind CSS Running Locally $ git clone https://git

Alex Carpenter 18 Dec 26, 2022
My personal website built with Next.js, TypeScript, twin.macro, Framer Motion, MDX and deployed on Vercel.

chrvaskos.com My personal website / blog built with some of my favorite technologies where I can showcase my work and write articles about anything ne

Vasilis Christoforidis 4 Mar 25, 2022
The Remix Blog Stack for deploying to Fly with MDX, SQLite, testing, linting, formatting, etc.

Remix Speed Metal Stack Learn more about Remix Stacks. npx create-remix --template Girish21/speed-metal-stack Remix Blog ?? This blog starter template

Girish 141 Jan 2, 2023
🔥 Bon5R — Create static, blog-aware websites with pure MDX.

Bon5R Create static, blog-aware websites with pure MDX. Explore the docs » View Demo · Report Bug · Request Feature Table of Contents About The Projec

Manu Anish 3 Jul 5, 2022