mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add genindex and domain indices to spine.
This commit is contained in:
@@ -229,8 +229,7 @@ class EpubBuilder(StandaloneHTMLBuilder):
|
|||||||
})
|
})
|
||||||
|
|
||||||
def fix_fragment(self, prefix, fragment):
|
def fix_fragment(self, prefix, fragment):
|
||||||
"""Return a href/id attribute with colons replaced by hyphens.
|
"""Return a href/id attribute with colons replaced by hyphens."""
|
||||||
"""
|
|
||||||
return prefix + fragment.replace(':', '-')
|
return prefix + fragment.replace(':', '-')
|
||||||
|
|
||||||
def fix_ids(self, tree):
|
def fix_ids(self, tree):
|
||||||
@@ -400,6 +399,14 @@ class EpubBuilder(StandaloneHTMLBuilder):
|
|||||||
spine.append(_spine_template % {
|
spine.append(_spine_template % {
|
||||||
'idref': self.esc(self.make_id(item['refuri']))
|
'idref': self.esc(self.make_id(item['refuri']))
|
||||||
})
|
})
|
||||||
|
for info in self.domain_indices:
|
||||||
|
spine.append(_spine_template % {
|
||||||
|
'idref': self.esc(self.make_id(info[0] + self.out_suffix))
|
||||||
|
})
|
||||||
|
if self.config.html_use_index:
|
||||||
|
spine.append(_spine_template % {
|
||||||
|
'idref': self.esc(self.make_id('genindex' + self.out_suffix))
|
||||||
|
})
|
||||||
spine = '\n'.join(spine)
|
spine = '\n'.join(spine)
|
||||||
|
|
||||||
# write the project file
|
# write the project file
|
||||||
|
|||||||
Reference in New Issue
Block a user