If you have a designer or you are good with LaTeX, you may have already produced a PDF that you're happy with.  But if you have the ability to generate Leanpub Flavoured Markdown or Markua from your manuscript sources (via a script) or if you are already writing in Leanpub Flavoured Markdown or Markua, you may still want to use Leanpub's book generation to produce EPUB and MOBI files.

If so, good news! We have a hidden feature which this article is the first to explain.

This feature works if you are using Dropbox, GitHub or Bitbucket to sync with Leanpub.

Here's what you do:

  1. Make a folder called custom in your book folder. It should be a sibling of the manuscript  directory, NOT inside the manuscript  directory.
  2. To override the book, put a custom PDF file inside that folder. It MUST be named <your-book-slug>.pdf .  For example, for a book whose URL is https://leanpub.com/lean the file would be called lean.pdf .
  3. To override the book sample (optional), put a custom PDF file inside that folder. It MUST be named <your-book-slug>-sample.pdf . For example, for a book whose URL is https://leanpub.com/lean the file would be called lean-sample.pdf .

Then, publish a new version! Your PDF (and, if you provided one, your sample) will override the one we generate, but you'll still get our EPUB and MOBI versions.

Note that this feature allows you to override any file format. So, if for some reason you like our PDFs but you really hate our EPUB files, you could override the EPUB file only.  We’ve never had anyone use it that way, but it works.

Finally, if you just want to upload a book, you don't need to use this approach.  Instead, just use our "Bring Your Own Book" approach to upload all your book files by drag and drop...

Did this answer your question?