Create an eBook (epub) of your Jekyll blog
= jekyll-epub
Create an eBook (epub) of your Jekyll blog
== How To
=== Create your blog 😉
First, you need to create your own Jekyll Blog 😉 Please, refer to the {Jekyll documentation}[http://wiki.github.com/mojombo/jekyll/].
=== Configuration
Then, you must add a configuration file : _epub.yml. This file is pretty similar to the Jekyll configuration file (_config.yml) except that’s you must add in some specifics entries. This entries are in the mapping epub:
_epub.yml :
epub:
name: “My Jekyll Blog”
lang: en
identifier: my_blog.example.com-123456
Note that’s in the file, you can also use all the {Jekyll configuration options}[http://wiki.github.com/mojombo/jekyll/configuration]. However, it is prudent not to change the permalink option, or you may spend a lot of time to set the proper access to resources (images, CSS, …). You have been warned;)
Here is the list of options :
=== Layout
If you want to use a special layout for your book, you can use the epub: mapping in the header of your pages, posts, layouts. This mapping is similar to the layout: mapping except that’s it is specific for the epub generation. In this example :
This is the content of my post...
When we generate the epub, Jekyll-epub will use the layout my_ebook.
=== Liquid extension
You can also use two Liquid extensions :
{% epub %}
… This will only be display in the epub …
{% endepub %}
{% noepub %}
… This will not be display in the epub …
{% endnoepub %}
Since I have add those two extensions, if you want to use them, you also need to use one of the two following solution
==== Use jekyll_epub
Otherwise, you will not be able to generate your (web) site.
See jekyll_epub --help for more information
==== Use Rack tasks
require ‘jekyll/epub/tasks’
Jekyll::Epub::Tasks do
web :serve_port, 4000
epub :destination, “_epub”
end
Use rake epub to generate the epub, use rake site to generate the website, use rake serve to serve the website.
== Note on Patches/Pull Requests
== Copyright
Copyright © 2010 Gregoire Lejeune. See LICENSE for details.