I wish there was a native version of this. Every SSG seems to have the problem of having to depend on node in order to prerender html for math with katex.
The costliest asset is a minified stylesheet served through a CDN. (I do this out of laziness, and because the web app as-is needs nothing more than the standard Rust toolchain).
The docs recommend setting up KaTeX CSS (which requires either a CDN link or Node), but by changing output to 'mathml,' you can have the browser render equations with zero dependencies.
Disclaimer: I am the author of PyKaTeX.