The Ultimate MDX Test: Charts, Code & Paywalls
Testing the new Bioinfometrics Next.js 15 MDX Compiler architecture with Recharts integration, Syntax Highlighting, and Supabase Gating.
Welcome to the new era of the Bioinfometrics Engine. This post is written entirely in .mdx and compiled dynamically on the server using React Server Components.
1. Syntax Highlighting
Thanks to rehype-pretty-code, any code written in markdown automatically gets a beautiful theme (like GitHub Dark/Light) that adapts to your preference, with a working Copy button!
// An example of our shiny new InteractiveGraph
import { InteractiveGraph } from "@/components/blog/InteractiveGraph";
export default function App() {
return (
<InteractiveGraph
data={fundingData}
config={{
type: "bar",
xAxisKey: "year",
yAxisKeys: [{ key: "agritech", name: "AgriTech" }]
}}
/>
)
}2. Universal Embedded Recharts
We no longer have to build custom layouts for data. We can just drop React Components straight into the markdown!
Global Bioeconomy Investments
Sector breakdown over the last 3 years.
3. Premium Content Gating
What happens if we drop a <PremiumChart /> in here? Since this markdown file has premium: false (or if you are a subscriber), the chart will render fully unlocked.
Subscriber Only Analysis
This chart dynamically blurs based on Supabase Authentication state.
Premium Content
Subscribe to see interactive chart
4. Typography & GFM
- We fully support Tables, Italics, and automatic
inline code snippets. - Quotes look elegant and inherit the Brand Serif font.
"The ability to seamlessly inject React interactive components into standard Markdown is the holy grail of modern technical publishing."
A Quick Table
| Sector | Growth (YoY) | Market Cap |
|---|---|---|
| AgriTech | +45% | $2.4B |
| BioEnergy | +12% | $1.1B |
| BioMaterials | +85% | $800M |
And that's it! The ultimate rendering engine is officially complete.
Discussion (0)
Sign in to join the conversation and share your thoughts
No comments yet. Be the first to start the discussion!