2 Commits

Author SHA1 Message Date
Andrew Stryker
8ff7fb63e6 Fix Mermaid rendering: move JS to extend_head, fix hook path
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>
2026-03-25 11:20:05 -07:00
Andrew Stryker
70bf848fa3 Add demos section with integration tests for site capabilities
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>
2026-03-25 09:47:37 -07:00