From b6f8f5d37c8ed554a1764c4b81183c7d24e56951 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 1 May 2008 18:51:07 +0000 Subject: [PATCH] Don't write modindex in html help index file if it's disabled. --- sphinx/htmlhelp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sphinx/htmlhelp.py b/sphinx/htmlhelp.py index 0742dba98..b3bbd4f63 100644 --- a/sphinx/htmlhelp.py +++ b/sphinx/htmlhelp.py @@ -147,7 +147,8 @@ def build_hhx(builder, outdir, outname): f.write(contents_header) # special books f.write('
  • ' + object_sitemap % ('Main page', 'index.html')) - f.write('
  • ' + object_sitemap % ('Global Module Index', 'modindex.html')) + if builder.config.html_use_modindex: + f.write('
  • ' + object_sitemap % ('Global Module Index', 'modindex.html')) # the TOC toc = builder.env.get_and_resolve_doctree(builder.config.master_doc, builder) def write_toc(node, ullevel=0):