In leanpub you write your book in a markdown variant they call Markua, marketed as "markdown for books".
TODO is there a reference implementation that runs locally for HTML output? Or the only reference implementation is closed under leanpub?
Spec: markua.com/