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>