Commits

Anonymous committed cb5f07a

added guide in the mobi builder

  • Participants
  • Parent commits 865130c

Comments (0)

Files changed (2)

File sphinx/builders/epub.py

         metadata['spine'] = spine
         return metadata
 
-    def build_content(self, outdir, outname):
+    def build_content(self, outdir, outname, content_template=None):
         """Write the metainfo file content.opf It contains bibliographic data,
         a file list and the spine (the reading order).
         """
             spine.append(_spine_template % {
                 'idref': self.esc(self.make_id('genindex' + self.out_suffix))
             })
-
+        
+        if content_template:
+            content_tmpl = content_template
+        else:
+            content_tmpl = _content_template
+        
         # add the optional cover
-        content_tmpl = _content_template
         if self.config.epub_cover:
             image, tmpl = self.config.epub_cover
             mpos = content_tmpl.rfind('</metadata>')

File sphinx/builders/mobi.py

     
     def get_theme_config(self):
         return self.config.mobi_theme, {}
+    
+    def build_content(self, outdir, outname):
+        """Write the metainfo file content.opf It contains bibliographic data,
+        a file list, the spine (the reading order) and the guide (first page
+        and html version of the toc).
+        """
+        
+        EpubBuilder.build_content(self, outdir, outname,
+            content_template=_content_template)