The legacy gitbook actually did what the name meant, it gives an option to download the book in pdf/epub/mobi format (though imo only pdf is readable for technical books with figures and code snippets)
For my books, I use pandoc+xelatex to convert Github style markdown to pdf, I searched stackoverflow sites for tex settings and I've now settled into a flow that works for me. I wrote an article too, if you'd like to compare with your flow:
I was not happy with the layout/design of the generated PDF, that’s why I decided to build my own converter 😉
yeah agree, legacy gitbook still works, but isn't good enough for publishing
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.