I'm currently writing a book in Markdown. Basically, I enjoy using Atom a lot, and I host the book in a private GitHub repository. Once I finish writing it, I'll just make the repository public and license it under Creative Commons. I have heard of GitBook and tried it out before (their web service that is), but I absolutely don't need it.