A Basic Standard Ebooks Source Folder
All Standard Ebooks source folders have the same basic structure. It looks a little like this:
-
images/contains the raw image files used in an ebook. For ebooks without illustrations, you’ll have the following three files:-
images/cover.svg, the raw cover image complete with title and author. -
images/titlepage.svg, the raw titlepage image. -
images/cover.source.jpg, not pictured; the raw, high-resolution artwork we’ve picked as the cover image background, kept here for future reference but not actually used in the final epub file. -
images/cover.jpg, not pictured; the scaled-down version ofcover.source.jpgthat will be referenced bycover.svgand included in the final epub file.
-
-
src/contains the actual source of the epub. This is the folder that’ll be zipped up as the final epub file, and where the bulk of our work will happen.-
src/META-INF/,src/META-INF/container.xml, andsrc/mimetypeare required by the epub spec; don’t edit them. -
src/epub/css/contains the CSS files used in the epub.-
src/epub/css/core.cssis the common CSS file used across all Standard Ebooks; don’t edit it. -
src/epub/css/local.cssis the CSS file that contains styles for this specific ebook. This is the one you’ll be editing, if necessary. Not all ebooks need custom CSS—the less custom CSS, the better!
-
-
src/epub/images/contains the images used in the final epub. Right now it contains the Standard Ebooks logo file used in the colophon; don’t edit the logo. Once you’ve finished the cover and titlepage images in./images/, thebuild-imagesscript will compile them and put them here. -
src/epub/text/is the meat and potatoes of the ebook! You’ll place the source XHTML files here, alongside the templatesse create-draftcreated for you:-
src/epub/text/colophon.xhtmlis the template for the Standard Ebooks colophon that appears at the end of every ebook. Usually you’ll edit this last, once you’ve finalized the cover page and metadata. -
src/epub/text/titlepage.xhtmlis the titlepage.se create-draftgenerated the title and author. Don’t edit this unless the title and author are incorrect. -
src/epub/text/unlicense.xhtmlis the Standard Ebooks public domain dedication. Don’t edit this at all.
-
-
src/epub/content.opfis the file that contains all of the epub’s metadata. You’ll be editing this heavily. -
src/epub/onix.xmlis a file containing accessibility information. Don’t edit this.
-