This is part three of a series explaining how to publish your book using Markdown.
PART ONE: How to write your book in Markdown
PART TWO: Creating an eBook-friendly EPUB file from Markdown
PART THREE: (This post) Create the Kindle MOBI file from your EPUB file
Now that you have your EPUB file tested and ready to go, you’ll need to create a MOBI file, which is what Amazon requires for their Kindle publishing service. While you can certainly upload your EPUB file directly, and Amazon will convert it for you, I prefer to do this myself so I have full control over formatting (and so that I can also preview it either using the Kindle emulator, or my own Kindle). Almost there. Let’s get rolling!
Setting up KindleGen
KindleGen is Amazon’s tool for convering EPUB to MOBI. It works on both Mac and PC, but I’ll focus here once again on Mac.
- Download KindleGen
-
Extract the file by double-clicking on it.
-
Drag the entire KindleGen directory to your Applications folder (you may want to rename it to simply
KindleGen
before you do this) -
Create an alias to KindleGen so you can run it from anywhere.
- Open Terminal
- Edit your Bash profile (for more info on how manage your Bash profile, check out this post from Nate Landau)
- Add this line:
alias kindlegen=/Applications/KindleGen/kindlegen
- Now you can just type
kindlegen
from anywhere in Terminal to load the KindleGen application. (If this doesn’t work, you may need to refresh your Bash profile. To do this, enter the following command in Terminal:source ~/.bash_profile
)
(Note: you can skip this step if you don’t want to mess around with Bash profiles.)
Creating the MOBI file from your EPUB
If you created an alias to KindleGen:
- Open Terminal
- Navigate to the directory where your EPUB file lives.
- Type
kindlegen EPUBFILENAME.epub
- MAGIC!
If you did not create an alias:
- Open Terminal
- Navigate to the directory where your EPUB file lives.
- Drag the kindlegen app from Applications > KindleGen into Terminal. This will automatically add a link directly to the app
- Type
kindlegen EPUBFILENAME.epub
- ALSO MAGIC!
Visit the KindleGen Readme to learn more about this tool.
Previewing the MOBI file
This part is pretty simple. Simply download and install Kindle Previewer.
You can also use the Send to Kindle via email feature if you want to view it on your Kindle directly, but I usually save that for the final read-through, since the previewer is a lot easier to use.
Congrats! You’ve created an ebook. Questions? Let me know in the comments.