I worte the book using Lyx (https://www.lyx.org/) Each chapter is a Lyx document.
Then I converted : Lyx to LaTeX, then LaTeX doc are converted to HTML with pandoc (https://pandoc.org/).
Then I have an homemade script to generate Vue Components.
Lyx and Pandoc are great tools !