Plain Markdown is fantastic. It’s simple, clean, and lets writers focus on what they do best: writing. But in today's web, static text and images are often not enough. What if you want to embed an interactive chart, a dynamic call-to-action, or a live data-driven component directly into your blog post?
This is where the limitations of traditional Markdown become clear. You could resort to clunky iframes or complex shortcode systems, but these often feel disconnected and are difficult to maintain.
Enter MDX. It’s a superset of Markdown that allows you to write JSX—the syntax used by React—directly within your content. It’s the perfect marriage of Markdown's simplicity and the power of interactive components.
The catch? Integrating MDX has historically required a complex build setup, tying you to specific frameworks and bundlers. Until now. With mdx.do, you can unlock the power of MDX through a simple API call, bringing dynamic content to any website or application.
At its core, MDX lets you do this:
# My Monthly Sales Report
Here's a breakdown of our performance this month. As you can see
from the interactive chart below, things are looking up!
<SalesChart period="monthly" theme="dark" />
We can continue writing more Markdown content right after the component.
It's seamless.
Instead of embedding a static image of a chart, you’ve embedded a fully interactive SalesChart component. This unlocks a new world of possibilities for your content:
While the benefits are clear, using MDX usually means wrestling with your build tools. You need to configure Webpack or Vite, install framework-specific plugins like @next/mdx, manage dependencies, and ensure everything plays nicely together. This adds complexity, increases build times, and can lock you into a specific tech stack.
What if you could skip all that?
mdx.do reimagines MDX compilation with a modern, API-first approach. It's a powerful agentic workflow platform that handles the heavy lifting of MDX processing on the server, giving you back ready-to-use code or HTML.
Forget the build pipeline. Just send your MDX source to our API, and we'll send you back the compiled result.
Here’s how simple it is:
import { mdx } from '.do';
// Your raw content, mixing Markdown and JSX
const mdxSource = `
# Hello, world!
Welcome to the future of content. This chart is a live component!
<MyChart type="line" data={...} />
`;
// Compile it with a simple API call
const { html, code } = await mdx.compile({
source: mdxSource,
components: { MyChart }, // Map your components
options: {
mdxOptions: {
// Extend with powerful plugins
remarkPlugins: [remarkGfm]
}
}
});
// Now you can render `html` or hydrate the `code` in your app!
With one command, you've transformed your dynamic MDX into a usable format without ever touching a local build configuration.
Q: What exactly is MDX?
A: MDX is a format that lets you write JSX (the syntax used by React) directly inside your Markdown files. It allows you to embed interactive components within your static content seamlessly.
Q: Why would I use mdx.do instead of a local library?
A: mdx.do provides a simple Agentic API to handle the compilation of MDX content on the server. This offloads complex build processes from your client, speeds up your site, and allows you to fetch fully-rendered, interactive content on demand, perfect for any framework or environment.
Q: Can I use mdx.do with my existing frontend framework?
A: Yes. Our API is framework-agnostic. You provide the MDX source, and mdx.do returns the compiled code or static HTML. You can then use this output with React, Next.js, Astro, Vue, Svelte, or any other library that can render JSX or HTML.
Q: Does mdx.do support remark and rehype plugins?
A: Absolutely. You can pass an array of remark and rehype plugins in your API call to mdx.do. This allows you to extend Markdown syntax, add table of contents, implement syntax highlighting, and perform countless other content transformations.
Stop letting your tools dictate what you can create. MDX offers a new frontier for digital content, and mdx.do makes it accessible to everyone.
Ready to transform your blog, documentation, or digital garden with rich, interactive components? Get started with mdx.do today and experience the future of content, simplified.