feat: full MDX rendering via WASM frontend #44

Open
opened 2026-02-12 11:39:45 +00:00 by mik-tf · 0 comments
Owner

Context

With issue #43 we add basic .mdx file support — the pipeline discovers, processes (Q&A extraction, search indexing), and serves .mdx files. However, JSX components in .mdx files do not render properly in the current server-side HTML viewer (pulldown-cmark treats JSX as raw HTML).

Goal

When the WASM/dioxus frontend is enabled, add proper MDX rendering so JSX components (React-style <div style={{...}}>, custom components like <Tabs>, <CodeBlock>, embedded iframes via Canva/YouTube, etc.) render correctly.

Approach options

  1. mdx-js compiled to WASM — use the JavaScript MDX compiler via wasm-bindgen
  2. Rust MDX parser — build or adopt a Rust-native MDX parser (none mature as of 2025)
  3. Client-side JS — load mdx-js in the browser for .mdx pages only (hybrid approach)

Prerequisites

  • WASM/dioxus frontend re-enabled (currently disabled in build-linux.yaml)
  • Issue #43 merged (basic .mdx pipeline support — file extension preserved through export)

Design constraint

The .mdx content must be preserved as-is through the pipeline (no stripping JSX, no renaming to .md). Issue #43 ensures this by preserving the original file extension during export. The WASM frontend can then check the extension and choose the appropriate renderer.

Priority

Low — only 5 .mdx files exist across all repos currently. Implement when WASM frontend phase begins.

## Context With issue #43 we add basic .mdx file support — the pipeline discovers, processes (Q&A extraction, search indexing), and serves .mdx files. However, JSX components in .mdx files do not render properly in the current server-side HTML viewer (pulldown-cmark treats JSX as raw HTML). ## Goal When the WASM/dioxus frontend is enabled, add proper MDX rendering so JSX components (React-style `<div style={{...}}>`, custom components like `<Tabs>`, `<CodeBlock>`, embedded iframes via Canva/YouTube, etc.) render correctly. ## Approach options 1. **mdx-js compiled to WASM** — use the JavaScript MDX compiler via wasm-bindgen 2. **Rust MDX parser** — build or adopt a Rust-native MDX parser (none mature as of 2025) 3. **Client-side JS** — load mdx-js in the browser for .mdx pages only (hybrid approach) ## Prerequisites - WASM/dioxus frontend re-enabled (currently disabled in build-linux.yaml) - Issue #43 merged (basic .mdx pipeline support — file extension preserved through export) ## Design constraint The .mdx content must be preserved as-is through the pipeline (no stripping JSX, no renaming to .md). Issue #43 ensures this by preserving the original file extension during export. The WASM frontend can then check the extension and choose the appropriate renderer. ## Priority Low — only 5 .mdx files exist across all repos currently. Implement when WASM frontend phase begins.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_books#44
No description provided.