mdx

JSX in Markdown for ambitious projects

Github星跟踪图

MDX: Markdown for the component era ?

Build Status
Join the community on Spectrum

MDX is an authorable format that lets you seamlessly use JSX in your markdown documents.
You can import components, like interactive charts or notifications, and export
metadata.
This makes writing long-form content with components a blast.

Example

See MDX in action:

import { Chart } from '../components/chart'

# Here’s a chart

The chart is rendered inside our MDX document.

<Chart />

Intro

MDX is markdown for the component era.
It lets you write JSX embedded inside markdown.
That’s a great combination because it allows you to use markdown’s often terse
syntax (such as # heading) for the little things and JSX for more advanced
components.

:heart: Powerful: MDX blends markdown and JSX syntax to fit perfectly in
React/JSX-based projects.

:computer: Everything is a component: Use existing components inside your
MDX and import other MDX files as plain components.

:wrench: Customizable: Decide which component is rendered for each markdown
element ({ h1: MyHeading }).

:books: Markdown-based: The simplicity and elegance of markdown remains,
you interleave JSX only when you want to.

:fire: Blazingly blazing fast: MDX has no runtime, all compilation occurs
during the build stage.

Watch some of these features in action

Getting started

npm init mdx

Visit mdxjs.com for more info, and check out Contribute below
to find out how to help out.

Why?

Before MDX, some of the benefits of writing markdown were lost when integrating
with JSX.
Implementations were often template string-based which required lots of escaping
and cumbersome syntax.

“MDX […] is extremely useful for using design system components to render
markdown and weaving interactive components in with existing markdown.”

@chrisbiscardi

MDX seeks to make writing with markdown and JSX simpler while being more
expressive.
The possibilities are endless when you combine components (that can even be
dynamic or load data) with the simplicity of markdown for long-form content.
A nice example of this is mdx-deck, a great way to create slides with MDX.

Sponsors

Read more about the unified collective on Medium »

Authors

See related projects in the MDX specification.

Contribute

MDX is built by people just like you!
See the Support and Contributing guidelines on the MDX website for ways
to (get) help.

This project has a Code of Conduct.
By interacting with this repository, organisation, or community you agree to
abide by its terms.

Want to chat with the community and contributors?
Join us on Spectrum!

License

MIT © Compositor and ZEIT

主要指标

概览
名称与所有者mdx-js/mdx
主编程语言JavaScript
编程语言JavaScript (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2017-12-24 00:01:48
推送于2025-06-09 01:42:03
最后一次提交
发布数240
最新版本名称3.1.0 (发布于 )
第一版名称v0.0.1 (发布于 2017-12-23 16:02:58)
用户参与
星数18.5k
关注者数86
派生数1.2k
提交数1.8k
已启用问题?
问题数682
打开的问题数6
拉请求数1103
打开的拉请求数6
关闭的拉请求数326
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?