: Convert your blog's HTML into EPUB 3 XHTML documents. This usually involves stripping out scripts or non-standard tags that e-readers can't handle.
You don't have to build a ZIP archiver from scratch. Several high-quality libraries handle the heavy lifting: RSCE JS epub
: This library uses a "template" approach, gutting a sample EPUB and refitting it with your specific content and metadata. : Convert your blog's HTML into EPUB 3 XHTML documents