You can create static pages to be displayed in your EPUB file like title pages at the beginning of your EPUB file or legal notices. Before you begin: To create static pages, a template must exist and you must log in with Confluence Admin permissions.
Create your Static Page
First you have to create a new HTML file with the wanted content for your static page.
-
Create a new HTML file in your EPUB template.
-
Define a title and insert the content of your static page.
-
Save the HTML file, for example 'titlepage.html'.
Link to the Static Page in the resources.opf.vm
The new HTML file needs to be linked in your template.
-
Open the file resources.opf.vm with a texteditor.
-
Scroll down to the <manifest>-tag and link to the HTML file by copying an existing <item>-tag and customize it. For example:
<item id="titlepage" href="titlepage.html" media-type="application/xhtml+xml"/>
-
Scroll down to the <spine>-tag and insert the itemref to the spine at the wanted position. For example:
<spine toc="ncx"> <itemref idref="titlepage"/> <!-- Add this line --> #macro(epubItemref $source) #if($source.Children.size() == 0) <itemref idref="_$source.id"/> #else <itemref idref="_$source.id"/> #foreach($child in $source.children) #epubItemref($child) #end #end #end <itemref idref="_$context.sourceTree.id"/> #foreach($child in $context.sourceTree.children) #epubItemref($child) #end </spine>
Link to the Static Page in the atlassian-plugin.xml
Finally you have to link the static page in the XML-file. This ensures that the Scroll EPUB exporter copies your HTML file from the template into the EPUB file.
-
Open the file atlassian-plugin.xml with a texteditor.
-
Scroll down to the <resource>-tags and link to the static page. For example:
<resource type="static-resource" name="titlepage.html" location="template/titlepage.html" />
-
Save the file and upload your
template as jar-file
.
When you use the template, the static page is inserted at the defined position with the wanted content.