The OPF file that represents the XHTML rendition of your EPUB (book.opf) is automatically generated.
Avoid direct edits to book.opf. Editing book.opf will lock book.opf and exclude it from the EPUB Generation process. Any subsequent changes to your Book’s structure or settings will not be reflected in book.opf. If you unlock book.opf, all your customizations will be lost.
Extensions allow you to include custom code in book.opf that is independent of the EPUB Generation process. Benefits include:
- Your customizations do not disrupt the automatic EPUB Generation process
- Your customizations will be included whenever the EPUB is regenerated
- Your customizations will be validated by the EPUB Error Scanner
Working with Extensions
Extensions are found under the Templates section of the Code Editor.
The following Extensions are available:
|Package.tag.extension||The contents of this file are inserted after the |
|Metadata.tag.extension||The contents of this file are inserted after the last child element of |
|Manifest.tag.extension||The contents of this file are inserted after the last child element of |
|Spine.tag.extension||The contents of this file are inserted after the last child element of |
Extensions should only include content that is allowed for Package Documents under the EPUB Specifications.