Skip to content

Integrate marq injections and hotmeal live-reloading (w/mermaid.js support)#237

Merged
fasterthanlime merged 8 commits intomainfrom
hotmeal-reload
Feb 9, 2026
Merged

Integrate marq injections and hotmeal live-reloading (w/mermaid.js support)#237
fasterthanlime merged 8 commits intomainfrom
hotmeal-reload

Conversation

@fasterthanlime
Copy link
Contributor

@fasterthanlime fasterthanlime commented Feb 9, 2026

Closes #235: uses marq's injections (for client-side stuff like mermaid.js etc.) and migrates to hotmeal's own live-reload code, which supports "opaque nodes", which are needed for client-side stuff to "re-render using their JS SDK" rather than "patch the DOM in-place".

…LiveReloadServer

- Replace manual html_cache HashMap with hotmeal_server::LiveReloadServer for
  HTML caching, diffing, and head injection change detection
- Thread head_injections from ServedHtml through ServeContent::Html, OutputFile::Html,
  and into inject_livereload_with_build_info for both serve and build paths
- Replace diff_html_cell IPC calls in trigger_reload with in-process
  LiveReloadServer.diff_route_with_head() which handles both HTML patches
  and head injection changes (HeadChanged -> full reload)
- Update marq to pick up head_injections on Document (mermaid now client-side)
- Remove unused diff_html/diff_html_cell wrapper functions from cells.rs
- Bump PICANTE_CACHE_VERSION to 5 (ParsedData/Section/Page shape changed)
Only inject copy buttons and position:relative styling into <pre>
elements that contain a <code> child (fenced code blocks). Raw HTML
<pre> blocks like <pre class="mermaid"> now pass through untouched.

Also add a mermaid diagram example to the features docs.

Fixes #233
hotmeal no longer escapes > to &gt; in text nodes, fixing raw HTML
<pre> blocks like mermaid diagrams.

See bearcove/hotmeal#34
@fasterthanlime fasterthanlime changed the title WIP hotmeal reload Integrate marq injections and hotmeal live-reloading (w/mermaid.js support) Feb 9, 2026
@fasterthanlime fasterthanlime merged commit 6f1d212 into main Feb 9, 2026
@fasterthanlime fasterthanlime deleted the hotmeal-reload branch February 9, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wire marq head_injections through markdown cell and adopt shared hotmeal live-reload

1 participant