Neat!
I once made a simple version of this concept that saves an epub file on the server‘s file system, which is then synced to my e-book reader:
https://github.com/solarkraft/webpub
The main ingredient is Postlight Parser, which gives a simplified „document“ view for a website.