To make an epub (or bunch other formats) from any website, firstly it should be saved locally:
Next, install Calibre from the repository:
Or download from its website.
Add the site structure to the calibre’s library by pointing on the index.html file or any other entrance point. Calibre’ll process it and compress in a single zip file. This file can be found in calibre’s library. Convert this zip file to epub by clicking on the “Convert books” button in main menu.
Or type in the terminal:
(ebook-convert is a part of Calibre utility)
An obtained epub file will be readable but will also contain some formatting errors. To fix them manually, rename epub to zip and edit a corresponding html/css/xml file. The contents list is usually located in a ncx file.
For example “GRUB4DOS Guide” from boot-land.net.