diff options
| author | Roland Meister <devnull@localhost> | 2010-01-09 11:19:41 +0100 |
|---|---|---|
| committer | Roland Meister <devnull@localhost> | 2010-01-09 11:19:41 +0100 |
| commit | 633fc33f08cd6fdf4b11a53ccd2549d18d20878f (patch) | |
| tree | dd236c23993867cd29154766e21dc2c36aacd184 /sphinx | |
| parent | c69928c56ea33852d8409c318920a22079af2584 (diff) | |
| download | sphinx-633fc33f08cd6fdf4b11a53ccd2549d18d20878f.tar.gz | |
Added the epub_tocdepth configuration option.
Diffstat (limited to 'sphinx')
| -rw-r--r-- | sphinx/builders/epub.py | 2 | ||||
| -rw-r--r-- | sphinx/config.py | 1 | ||||
| -rw-r--r-- | sphinx/quickstart.py | 3 |
3 files changed, 6 insertions, 0 deletions
diff --git a/sphinx/builders/epub.py b/sphinx/builders/epub.py index e78f807e..0e4529e5 100644 --- a/sphinx/builders/epub.py +++ b/sphinx/builders/epub.py @@ -355,6 +355,8 @@ class EpubBuilder(StandaloneHTMLBuilder): file = node['refuri'].split('#')[0] if file in self.ignored_files: continue + if node['level'] > self.config.epub_tocdepth: + continue if node['level'] == level: navlist.append(self.new_navpoint(node, level)) elif node['level'] == level + 1: diff --git a/sphinx/config.py b/sphinx/config.py index 5fe3f63f..e7e05169 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -112,6 +112,7 @@ class Config(object): epub_pre_files = ([], 'env'), epub_post_files = ([], 'env'), epub_exclude_files = ([], 'env'), + epub_tocdepth = (3, 'env'), # LaTeX options latex_documents = ([], None), diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py index faea2c2e..a7b80dd5 100644 --- a/sphinx/quickstart.py +++ b/sphinx/quickstart.py @@ -254,6 +254,9 @@ latex_documents = [ # A list of files that should not be packed into the epub file. #epub_exclude_files = [] + +# The depth of the table of contents in toc.ncx. +#epub_tocdepth = 3 ''' INTERSPHINX_CONFIG = ''' |
