first, write a book in .mdx
so that you can import chapters as files.
you cannot use .md
if you want to import files. only .mdx
supports importing of files.
then use mdx-bundler
to add classnames to the .mdx
file.
use print.css
to have print styles.
use tailwind to style the book aesthetically.
open the book in a web browser & print it using playwright.
get the pdf.
use the pdf to generate epub.
convert from epub to mobi.
viola, you have pdf, epub, and mobi.