This boilerplate provides a complete template for generating ePub-formatted books. It includes all the standard sections of a book (eg. table of contents, prologue, etc), descriptions of their use and contains examples of ePub features at work (eg. end notes, index, etc)
Fork of https://javierarce.github.com/epub-boilerplate
The structure below is included in the boilerplate and it conforms to the standard structure of book design. It is common practice to follow the order described here.
Not all books require every section and in some cases some sections can be merged into one (eg. preface and acknowledgment).
-
Front matter
- Cover
- Title
- Edition Notice
- Dedication
- Table of Contents
- List of Illustrations
- List of Tables
- Foreword
- Preface
- Acknowledgements
- Epigraph
- Introduction
- Prologue
-
Body matter
- PART I
- Chapter 1
- Chapter 2
- PART II
- Chapter 3
- Chapter 4
- PART III
- Chapter 5
- Chapter 6
- PART I
-
Back matter
- Epilogue
- Afterword
- Addendum
- End Notes
- Glossary
- Bibliography
- Index
- Colophon
-
Get the template:
$ git clone [email protected]:javierarce/epub-boilerplate.git
-
Edit the contents of the
book
directory. -
Run the publish script to generate and validate the book:
$ ./publish book.epub
-
File
TOC.xhtml
-
Edit meta tag
dtb:uid
to reflect your unique identifier (uuid, isbn, etc)<meta content="urn:isbn:[ISBN]" name="dtb:uid"/>
-
Edit the content depth
<meta content="1" name="dtb:depth"/>
-
Edit with the title of the book
<docTitle> <text>[BOOK'S TITLE]</text> </docTitle>
-
Describe the structure of your book with
navPoint
nodes and subnodes.
-
-
Folder
Text-Frontmatter
- Edit the cover, title, table of content, etc.
- If needed remove unnecesary sections.
-
Folder
Text
- Create the proper book structure using parts/volumes and chapters.
-
Folder
Text-Backmatter
- Edit the appropiate sections.
- If needed remove unnecesary sections.
-
File
CONTENT.opf
- Enter the metadata of the book under
metadata
- Enter the full list of files used in the book under
manifest
- Enter the order in which the text files should appear under
spine
- Enter the role of each file type under
guide
- Enter the metadata of the book under
This project uses epubcheck to validate the generated ePubs. If the build.sh script complains when running epubcheck, make sure you have java installed and it's in your PATH.
If you need help running epubcheck read this step-by-step guide.
$ ./check book.epub
Basic styles have been added to the style.css
file to accomodate for standard layouts of the sections included.
For more advanced styles have a look at the ePub CSS Starter Kit.
- ePub 2.0 Publication specs
- ePub 2.0 OPF Package Document specs
- ePub 3.0 spec
- Device compatibilty chart
- ePub CSS Starter Kit
- ePub Validator
- UUID generator
- BISAC Subject Headings List
- Practical ePub metadata: Authorship
- MARC Code List for Relators
- What Is EPUB 3? An Introduction to the EPUB Specification for Multimedia Publishing