mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Empty titles in epub_pre/post_files add no entry in toc.ncx.
This commit is contained in:
parent
81c935a1b5
commit
7a41ec29b8
@ -757,7 +757,7 @@ the `Dublin Core metadata <http://dublincore.org/>`_.
|
||||
|
||||
Additional files that should be inserted before the text generated by
|
||||
Sphinx. It is a list of tuples containing the file name and the title.
|
||||
Example::
|
||||
If the title is empty, no entry is added to :file:`toc.ncx`. Example::
|
||||
|
||||
epub_pre_files = [
|
||||
('index.html', 'Welcome'),
|
||||
@ -769,7 +769,8 @@ the `Dublin Core metadata <http://dublincore.org/>`_.
|
||||
|
||||
Additional files that should be inserted after the text generated by Sphinx.
|
||||
It is a list of tuples containing the file name and the title. This option
|
||||
can be used to add an appendix. The default value is ``[]``.
|
||||
can be used to add an appendix. If the title is empty, no entry is added
|
||||
to :file:`toc.ncx`. The default value is ``[]``.
|
||||
|
||||
.. confval:: epub_exclude_files
|
||||
|
||||
|
@ -439,6 +439,8 @@ class EpubBuilder(StandaloneHTMLBuilder):
|
||||
level = 1
|
||||
lastnode = None
|
||||
for node in nodes:
|
||||
if not node['text']:
|
||||
continue
|
||||
file = node['refuri'].split('#')[0]
|
||||
if file in self.ignored_files:
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user