yeah, hugo works fine. but since it’s an SSG, no instant page reloads.
some guy in the forums suggested hooking hugo onto react, but nah bro, that sounds like a really bad idea.
but then what about htmx? i didn’t know if it would work. i mean, there’s no server, no API returning HTML, no need to use hx-get and hx-target and all that. i assumed htmx wouldn’t work in an SSG context because htmx was always talked about in relation to backend, JSON, HATEOAS, hypermedia approach and all that.
but turns out, it was pretty easy! for instant page reloads, just add hx-boost="true" hx-swap="innerHTML" to the <body> tag, and that’s it!
but it was pretty jarring, so enabled htmx’s View Transitions support via meta tag, transition:true to the hx-swap attribute in <body> and some View Transition CSS, and animations work just like that!
also added a spinner with id="htmx-spinner", and mentioned it in <body> (hx-indicator="#htmx-spinner") and it works! also added hx-preserve to the spinner, cause hx-boost replaces the body content with that of the new one.
and that’s about it! no react, vue, svelte or astro. just regular html.