Skip to main content
Skip table of contents

How Can I Excerpt the Root Page from the EPUB Export?


How can I excerpt the root page from the EPUB export?


If you want to use a page to set the scope of what pages will be included in your export but you do not want to include that page in the export please follow the steps below. If you want to include pages from all over the Space, you have to start the export from the root page of the Space.

  1. Create your own EPUB export template.
  2. Adapt the files toc.ncx.vm, resources.opf.vm and atlassian-plugin.xml. Remove the entries for the root page in those files. That will effectively exclude the root page from the Ebook structure even if a HTML file is still generated for it and included in the EPUB file.
    (info) If there is content on that page that is not supposed to be exported, place into a Scroll-ignore macro.
  3. Adapt the example template as follows:
    • toc.ncx.vm (toc.ncx.vm on Bitbucket)
      1. Remove lines 37 to 47 (including those).
      2. Instead insert the following code: 

        #set($playOrder = 0) 
        #foreach($child in $context.sourceTree.children) 
        #set($playOrder = $playOrder + 1) 
    • resources.opf.vm (resources.opf.vm on Bitbucket).
      • Remove lines 39 and 61.
    • atlassian-plugin.xml (atlassian-plugin.xml on Bitbucket).
      • Insert the following code as last entry in the <scroll-template> element (between lines 72 and 73):

        <resource type="static-resource" name="resources.opf" location="template/resources.opf.vm"> 
        <param name="needsRendering">true</param> 
        <resource type="static-resource" name="toc.ncx" location="template/toc.ncx.vm"> 
        <param name="needsRendering">true</param> 

        This will ensure that your modified files will be used instead of the defaults that are bundled with the exporter.

The filename of the EPUB file is still based on the root page title. This cannot be changed so far, but you can easily rename it.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.