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
- Add a React component under
src/demos/. - Register its name in
src/demos/names.tsand a lazy loader insrc/demos/registry.ts. - 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.