E-books for Journals with EPUB Generator for Jekyll

The JSR editors been making a lot of changes at the Journal of Southern Religion in the past year. We’ve rebuilt the site from the ground up, we’ve released our content under an open-access license (written up here), we’ve added a successful podcast with seven episodes already, and we’re getting close to adding DOIs and releasing a new issue. Sometime soon I want to write a full ‘making of’ post about the decisions we made and the tools we used. Today, though, I want to introduce a Ruby script I’ve written for the JSR to make e-books in EPUB format of each issue.

The JSR‘s website runs on Jekyll, a ’simple, blog aware, static site generator’ that converts Markdown files into a website. In other words, JSR articles are stored in plain text files like these from issue 13. Stephen Ramsay explains why this is a good thing. Because the JSR content is portable and parsable, it’s easy to use the content for purposes other than the website itself.

One of the new things I want to do with the JSR is make an e-book of each issue, so that scholars can read the journal on tablets and mobiles more immersively than is possible on a website. Whether there interest among JSR readers in this new format remains to be seen, but other people are writing about EPUB for scholars and other open-access journals, like the Journal of Digital Humanities are releasing their content as EPUB.

I’ve written a Ruby script, epub-jekyll, which parses posts and pages in a Jekyll website and passes them through Pandoc to create an EPUB. Because the script uses a YAML file as a table of contents, it should be useable on other Jekyll (or Octopress) websites. You can get the code from GitHub and learn how to use the script in the README.

This my first project in Ruby, so I’ll be glad for any improvements you’d like to suggest.

Update 2012-11-01: I learned that there is another project called jekyll-epub so I had to change the name of this project to jekyll-ebook. The links above have been corrected. And I’ve also published the project as a gem.