Three issues prevented Mermaid diagrams from rendering:
1. Render hook was in layouts/_defaults/ (with 's') instead of
layouts/_default/ — Hugo never found it
2. The .Store.Set approach in the render hook couldn't communicate
with extend_footer because PaperMod caches the footer partial
via partialCached, so per-page state is lost
3. Moved Mermaid JS loading to extend_head (not cached) using the
same xparams.mermaid front matter flag pattern as KaTeX
Pages opt in with xparams.mermaid: true in front matter. The code
block render hook still converts ```mermaid fences to <pre> tags.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move reactable demo from content/posts/ to content/demos/ so it
doesn't appear in the posts list. Add demo pages for:
- Mermaid: flowchart, sequence, and state diagrams via code blocks
- KaTeX: inline and display math via the math partial
- Shortcodes: toc, rawhtml, youtube, vimeo
All demos are draft: true and in a dedicated section, so they
build with hugo --buildDrafts but are never published.
Also widen Makefile RMD_SOURCES glob to include content/demos/.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>