GithubHelp home page GithubHelp logo

sw-yx / mdx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mdx-js/mdx

0.0 3.0 0.0 1.47 MB

JSX in Markdown for ambitious projects

Home Page: https://mdxjs.com

License: MIT License

Dockerfile 0.42% JavaScript 99.58%

mdx's Introduction

MDX

Build Status lerna Join the community on Spectrum

Markdown for the component era.

MDX is a 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. 🚀


Announcing the unified collective! 🎉 Read more about it on Medium »

Sponsors



🥇 ZEIT


🥇 Gatsby


🥉 Compositor


Holloway




You?

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.

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

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

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

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

🔥 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.

Related

See related projects in the MDX specification.

Authors

Contribute

MDX is built by people just like you! Check out contributing.md for ways to get started.

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's People

Contributors

johno avatar timneutkens avatar silvenon avatar wooorm avatar manovotny avatar christopherbiscardi avatar jeetiss avatar danielruf avatar macklinu avatar pshrmn avatar devongovett avatar ayc0 avatar treshugart avatar trevordmiller avatar tors avatar sebastiandedeyne avatar saratonite avatar isthisnagee avatar azz avatar lorensr avatar l3wi avatar johncmunson avatar maadhattah avatar compuives avatar hugmanrique avatar demiand avatar ifyoumakeit avatar danmarshall avatar christiannwamba avatar

Watchers

James Cloos avatar swyx.io avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.