Note: A sample ebook package is provided in the sample-ebook-package
folder. This sample package contains everything below.
- Create a new folder. This will be the root of your new ebook. Everything in
this style
and anyfrom here on is case-sensitive.code
- Inside the new folder, create:
- a file named
mimetype
, - a folder named
META-INF
, and - a folder named
EPUB
.
- a file named
- Inside the file
mimetype
, add the lineapplication/epub+zip
. - Inside the
META-INF
folder, create a file namedcontainer.xml
. - Inside the file
container.xml
, add the following:<?xml version="1.0" encoding="utf-8"?> <container xmlns="urn:oasis:names:tc:opendocument:xmlns:container" version="1.0"> <rootfiles> <rootfile full-path="EPUB/content.opf" media-type="application/oebps-package+xml"/> </rootfiles> </container>
- Inside the
EPUB
folder, create a file namedcontent.opf
. - Inside the file
content.opf
, add the following:<?xml version="1.0" encoding="utf-8"?> <package xmlns="http://www.idpf.org/2007/opf" version="3.0" unique-identifier="ebookID"> <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:identifier id="ebookID"></dc:identifier> <dc:title></dc:title> <dc:language></dc:language> <meta property="dcterms:modified"></meta> </metadata> <manifest> <item id="" href="" media-type=""/> </manifest> <spine> <itemref idref=""/> </spine> </package>