Demo islands

Selected pages can embed interactive React demos without MDX. Put a shortcode alone in its own paragraph; the build replaces it with a placeholder, and the client hydrates that island after load.

Example

The shortcode below mounts CounterDemo from the closed demo registry:

Interactive demo

Authoring

  1. Add a React component under src/demos/.
  2. Register its name in src/demos/names.ts and a lazy loader in src/demos/registry.ts.
  3. Embed it with {{demo:YourDemoName}} on its own line in Markdown.

Unknown demo names fail the build. Shortcodes inside prose paragraphs (not alone) also fail the build.