diff --git a/mix.exs b/mix.exs
index 4c4bdcb7..bc4c92c8 100644
--- a/mix.exs
+++ b/mix.exs
@@ -145,35 +145,49 @@ defmodule Hyper.MixProject do
]
end
- # Load Mermaid in the HTML docs and render any ```mermaid code fences as
- # diagrams. ExDoc tags Mermaid blocks with the `mermaid` class.
+ # KaTeX (math) and Mermaid (diagrams) rendering for the HTML docs. This is the
+ # recipe ExDoc's own README prescribes: ExDoc navigates between pages with
+ # swup (client-side content swaps) and re-fires `exdoc:loaded` on window after
+ # every swap as well as on the initial load. Hanging rendering off that event
+ # -- rather than DOMContentLoaded / a script `onload`, which fire only once --
+ # is what keeps math and diagrams rendered as a reader navigates the docs.
defp before_closing_body_tag(:html) do
"""
-
-
+
+
"""