"But it's surprisingly challenging to publish books on the web in nice, cohesive, tight, easy-to-navigate HTML format."
Quarto is one great option for doing that today. Bonus: it can also generate EPUBs and PDFs, all from one set of source files.
It's free and open source.
https://github.com/quarto-dev/quarto-cli
Example books: