I'm a big fan of Markdown (Love using them to write blog posts, etc), so this weekend I took some time to throw together a build pipeline that converts
.md files to pdf.
After seeing that a number of others have written full ebooks in Markdown (like Adam Wathan), I wanted to try the same thing out. The pipeline was pretty quick to throw together, it basically takes multiple
.md files, merges them together, converts them to HTML (+ applies CSS styles), and then generates the final pdf.
I open-sourced the project here: https://github.com/RyanFitzgerald/ebook-generator
If you'd like to see the example PDF output, you can download the sample from Github directly: https://github.com/RyanFitzgerald/ebook-generator/raw/master/output/book.pdf
It's not perfect but it gets the job done and spits out some decent looking pdfs. So feel free to use it, fork it, or just get some inspiration from it if you want to build your own!