diff --git a/AUTHORS b/AUTHORS
index 54f53db2d..6e215c8c1 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -5,6 +5,7 @@ Substantial parts of the templates were written by Armin Ronacher
Other contributors, listed alphabetically, are:
+* Andi Albrecht -- agogo theme
* Henrique Bastos -- SVG support for graphviz extension
* Daniel Bültmann -- todo extension
* Michael Droettboom -- inheritance_diagram extension
@@ -15,6 +16,7 @@ Other contributors, listed alphabetically, are:
* Dave Kuhlman -- original LaTeX writer
* Thomas Lamb -- linkcheck builder
* Dan MacKinlay -- metadata fixes
+* Martin Mahner -- nature theme
* Will Maier -- directory HTML builder
* Roland Meister -- epub builder
* Christopher Perkins -- autosummary integration
diff --git a/CHANGES b/CHANGES
index 27761d8ad..60772b7e7 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,19 @@ Release 1.0 (in development)
* Support for docutils 0.4 has been removed.
+* The ``html_sidebars`` config value can now contain patterns as
+ keys, and the values can be lists that explicitly select which
+ sidebar templates should be rendered. That means that the builtin
+ sidebar contents can be included only selectively.
+
+* ``html_static_path`` can now contain single file entries.
+
+* The new universal config value ``exclude_patterns`` makes the
+ old ``unused_docs``, ``exclude_trees`` and ``exclude_dirnames``
+ obsolete.
+
+* Remove the deprecated ``exclude_dirs`` config value.
+
* #129: Wrap toctrees in a div tag with class ``toctree-wrapper``
in HTML output.
@@ -23,11 +36,13 @@ Release 1.0 (in development)
* #284: All docinfo metadata is now put into the document metadata, not
just the author.
+* Added new HTML theme ``haiku``, inspired by the Haiku OS user guide.
+
* Added new HTML theme ``nature``.
* Added new HTML theme ``agogo``, created by Andi Albrecht.
-* Added new HTML theme called scrolls, created by Armin Ronacher.
+* Added new HTML theme ``scrolls``, created by Armin Ronacher.
* The ``toctree()`` callable in templates now has a ``maxdepth``
keyword argument to control the depth of the generated tree.
diff --git a/doc/conf.py b/doc/conf.py
index 279072d69..afa330681 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -18,6 +18,8 @@ source_suffix = '.rst'
# The master toctree document.
master_doc = 'contents'
+exclude_patterns = ['_build']
+
# General substitutions.
project = 'Sphinx'
copyright = '2007-2010, Georg Brandl'
@@ -50,7 +52,7 @@ html_last_updated_fmt = '%b %d, %Y'
html_index = 'index.html'
# Custom sidebar templates, maps page names to templates.
-html_sidebars = {'index': 'indexsidebar.html'}
+html_sidebars = {'index': ['indexsidebar.html', 'searchbox.html']}
# Additional templates that should be rendered to pages, maps page names to
# templates.
diff --git a/doc/config.rst b/doc/config.rst
index daceaf789..3b2336837 100644
--- a/doc/config.rst
+++ b/doc/config.rst
@@ -87,12 +87,37 @@ General configuration
The document name of the "master" document, that is, the document that
contains the root :dir:`toctree` directive. Default is ``'contents'``.
+.. confval:: exclude_patterns
+
+ A list of glob-style patterns that should be excluded when looking for source
+ files. [1]_ They are matched against the source file names relative to the
+ source directory, using slashes as directory separators on all platforms.
+
+ Example patterns:
+
+ - ``'library/xml.rst'`` -- ignores the ``library/xml.rst`` file (replaces
+ entry in :confval:`unused_docs`
+ - ``'library/xml'`` -- ignores the ``library/xml`` directory (replaces entry
+ in :confval:`exclude_trees`)
+ - ``'library/xml*'`` -- ignores all files and directories starting with
+ ``library/xml``
+ - ``'**/.svn'`` -- ignores all ``.svn`` directories (replaces entry in
+ :confval:`exclude_dirnames`)
+
+ :confval:`exclude_patterns` is also consulted when looking for static files
+ in :confval:`html_static_path`.
+
+ .. versionadded:: 1.0
+
.. confval:: unused_docs
A list of document names that are present, but not currently included in the
toctree. Use this setting to suppress the warning that is normally emitted
in that case.
+ .. deprecated:: 1.0
+ Use :confval:`exclude_patterns` instead.
+
.. confval:: exclude_trees
A list of directory paths, relative to the source directory, that are to be
@@ -101,6 +126,9 @@ General configuration
.. versionadded:: 0.4
+ .. deprecated:: 1.0
+ Use :confval:`exclude_patterns` instead.
+
.. confval:: exclude_dirnames
A list of directory names that are to be excluded from any recursive
@@ -110,15 +138,8 @@ General configuration
.. versionadded:: 0.5
-.. confval:: exclude_dirs
-
- A list of directory names, relative to the source directory, that are to be
- excluded from the search for source files.
-
- .. deprecated:: 0.5
- This does not take subdirs of the excluded directories into account. Use
- :confval:`exclude_trees` or :confval:`exclude_dirnames`, which match the
- expectations.
+ .. deprecated:: 1.0
+ Use :confval:`exclude_patterns` instead.
.. confval:: locale_dirs
@@ -399,6 +420,9 @@ that use Sphinx' HTMLWriter class.
.. versionchanged:: 0.4
The paths in :confval:`html_static_path` can now contain subdirectories.
+ .. versionchanged:: 1.0
+ The entries in :confval:`html_static_path` can now be single files.
+
.. confval:: html_last_updated_fmt
If this is not the empty string, a 'Last updated on:' timestamp is inserted
@@ -422,14 +446,53 @@ that use Sphinx' HTMLWriter class.
.. confval:: html_sidebars
Custom sidebar templates, must be a dictionary that maps document names to
- template names. Example::
+ template names.
+
+ The keys can contain glob-style patterns [1]_, in which case all matching
+ documents will get the specified sidebars. (A warning is emitted when a
+ more than one glob-style pattern matches for any document.)
+
+ The values can be either lists or single strings.
+
+ * If a value is a list, it specifies the complete list of sidebar templates
+ to include. If all or some of the default sidebars are to be included,
+ they must be put into this list as well.
+
+ The default sidebars (for documents that don't match any pattern) are:
+ ``['localtoc.html', 'relations.html', 'sourcelink.html',
+ 'searchbox.html']``.
+
+ * If a value is a single string, it specifies a custom sidebar to be added
+ between the ``'sourcelink.html'`` and ``'searchbox.html'`` entries. This
+ is for compatibility with Sphinx versions before 1.0.
+
+ Builtin sidebar templates that can be rendered are:
+
+ * **localtoc.html** -- a fine-grained table of contents of the current document
+ * **globaltoc.html** -- a coarse-grained table of contents for the whole
+ documentation set, collapsed
+ * **relations.html** -- two links to the previous and next documents
+ * **sourcelink.html** -- a link to the source of the current document, if
+ enabled in :confval:`html_show_sourcelink`
+ * **searchbox.html** -- the "quick search" box
+
+ Example::
html_sidebars = {
- 'using/windows': 'windowssidebar.html'
+ '**': ['globaltoc.html', 'sourcelink.html', 'searchbox.html'],
+ 'using/windows': ['windowssidebar.html', 'searchbox.html'],
}
- This will render the template ``windowssidebar.html`` within the sidebar of
- the given document.
+ This will render the custom template ``windowssidebar.html`` and the quick
+ search box within the sidebar of the given document, and render the default
+ sidebars for all other pages (except that the local TOC is replaced by the
+ global TOC).
+
+ .. versionadded:: 1.0
+ The ability to use globbing keys and to specify multiple sidebars.
+
+ Note that this value only has no effect if the chosen theme does not possess
+ a sidebar, like the builtin **scrolls** and **haiku** themes.
.. confval:: html_additional_pages
@@ -808,3 +871,11 @@ These options influence LaTeX output.
.. deprecated:: 0.5
Use the ``'pointsize'`` key in the :confval:`latex_elements` value.
+
+
+.. rubric:: Footnotes
+
+.. [1] A note on available globbing syntax: you can use the standard shell
+ constructs ``*``, ``?``, ``[...]`` and ``[!...]`` with the feature that
+ these all don't match slashes. A double star ``**`` can be used to match
+ any sequence of characters *including* slashes.
diff --git a/doc/ext/autosummary.rst b/doc/ext/autosummary.rst
index 5a206dd50..20b688c1f 100644
--- a/doc/ext/autosummary.rst
+++ b/doc/ext/autosummary.rst
@@ -163,6 +163,8 @@ Autosummary uses the following template files:
The following variables available in the templates:
+.. currentmodule:: None
+
.. data:: name
Name of the documented object, excluding the module and class parts.
diff --git a/doc/themes/agogo.png b/doc/themes/agogo.png
index 7afc4a136..d29aa45cc 100644
Binary files a/doc/themes/agogo.png and b/doc/themes/agogo.png differ
diff --git a/doc/themes/default.png b/doc/themes/default.png
index be821b676..93d8526c8 100644
Binary files a/doc/themes/default.png and b/doc/themes/default.png differ
diff --git a/doc/themes/fullsize/haiku.png b/doc/themes/fullsize/haiku.png
new file mode 100644
index 000000000..1590da5d4
Binary files /dev/null and b/doc/themes/fullsize/haiku.png differ
diff --git a/doc/themes/haiku.png b/doc/themes/haiku.png
new file mode 100644
index 000000000..a8ae85579
Binary files /dev/null and b/doc/themes/haiku.png differ
diff --git a/doc/themes/nature.png b/doc/themes/nature.png
index 053970d8c..3d4f587f7 100644
Binary files a/doc/themes/nature.png and b/doc/themes/nature.png differ
diff --git a/doc/themes/scrolls.png b/doc/themes/scrolls.png
index e4cb9aa9c..8073c10e0 100644
Binary files a/doc/themes/scrolls.png and b/doc/themes/scrolls.png differ
diff --git a/doc/themes/sphinxdoc.png b/doc/themes/sphinxdoc.png
index 2d2723a8c..f4b59ecdb 100644
Binary files a/doc/themes/sphinxdoc.png and b/doc/themes/sphinxdoc.png differ
diff --git a/doc/themes/traditional.png b/doc/themes/traditional.png
index 535213fe2..4ad2b5ce1 100644
Binary files a/doc/themes/traditional.png and b/doc/themes/traditional.png differ
diff --git a/doc/theming.rst b/doc/theming.rst
index 4771dbec5..6c650e4a6 100644
--- a/doc/theming.rst
+++ b/doc/theming.rst
@@ -69,6 +69,10 @@ Builtin themes
| | |
| *traditional* | *nature* |
+--------------------+--------------------+
+| |haiku| | |
+| | |
+| *haiku* | |
++--------------------+--------------------+
.. |default| image:: themes/default.png
.. |sphinxdoc| image:: themes/sphinxdoc.png
@@ -76,15 +80,16 @@ Builtin themes
.. |agogo| image:: themes/agogo.png
.. |traditional| image:: themes/traditional.png
.. |nature| image:: themes/nature.png
+.. |haiku| image:: themes/haiku.png
Sphinx comes with a selection of themes to choose from.
These themes are:
* **basic** -- This is a basically unstyled layout used as the base for the
- *default* and *sphinxdoc* themes, and usable as the base for custom themes as
- well. The HTML contains all important elements like sidebar and relation bar.
- There is one option (which is inherited by *default* and *sphinxdoc*):
+ other themes, and usable as the base for custom themes as well. The HTML
+ contains all important elements like sidebar and relation bar. There is one
+ option (which is inherited by the other themes):
- **nosidebar** (true or false): Don't include the sidebar. Defaults to
false.
@@ -161,6 +166,17 @@ These themes are:
* **nature** -- A greenish theme. There are currently no options beyond
*nosidebar*.
+* **haiku** -- A theme without sidebar inspired by the `Haiku OS user guide
+ `_. The following
+ options are supported:
+
+ - **full_logo** (true or false, default false): If this is true, the header
+ will only show the :confval:`html_logo`. Use this for large logos. If this
+ is false, the logo (if present) will be shown floating right, and the
+ documentation title will be put in the header.
+ - **textcolor**, **headingcolor**, **linkcolor**, **visitedlinkcolor**,
+ **hoverlinkcolor** (CSS colors): Colors for various body elements.
+
* **traditional** -- A theme resembling the old Python documentation. There are
currently no options beyond *nosidebar*.
diff --git a/sphinx/builders/changes.py b/sphinx/builders/changes.py
index 92c48f16e..3bc51d43d 100644
--- a/sphinx/builders/changes.py
+++ b/sphinx/builders/changes.py
@@ -139,11 +139,10 @@ class ChangesBuilder(Builder):
self.theme.get_options({}).iteritems())
copy_static_entry(path.join(package_dir, 'themes', 'default',
'static', 'default.css_t'),
- path.join(self.outdir, 'default.css_t'),
- self, themectx)
+ self.outdir, self, themectx)
copy_static_entry(path.join(package_dir, 'themes', 'basic',
'static', 'basic.css'),
- path.join(self.outdir, 'basic.css'), self)
+ self.outdir, self)
def hl(self, text, version):
text = escape(text)
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py
index 5c03bf809..bbd01f766 100644
--- a/sphinx/builders/html.py
+++ b/sphinx/builders/html.py
@@ -29,8 +29,8 @@ from docutils.frontend import OptionParser
from docutils.readers.doctree import Reader as DoctreeReader
from sphinx import package_dir, __version__
-from sphinx.util import SEP, os_path, relative_uri, ensuredir, \
- movefile, ustrftime, copy_static_entry, copyfile
+from sphinx.util import SEP, os_path, relative_uri, ensuredir, patmatch, \
+ movefile, ustrftime, copy_static_entry, copyfile, compile_matchers, any
from sphinx.errors import SphinxError
from sphinx.search import js_index
from sphinx.theming import Theme
@@ -76,6 +76,9 @@ class StandaloneHTMLBuilder(Builder):
# Dito for this one.
css_files = []
+ default_sidebars = ['localtoc.html', 'relations.html',
+ 'sourcelink.html', 'searchbox.html']
+
# cached publisher object for snippets
_publisher = None
@@ -561,30 +564,39 @@ class StandaloneHTMLBuilder(Builder):
if path.isfile(jsfile):
copyfile(jsfile, path.join(self.outdir, '_static',
'translations.js'))
- # then, copy over all user-supplied static files
+ # then, copy over theme-supplied static files
if self.theme:
- staticdirnames = [path.join(themepath, 'static')
- for themepath in self.theme.get_dirchain()[::-1]]
- else:
- staticdirnames = []
- staticdirnames += [path.join(self.confdir, spath)
- for spath in self.config.html_static_path]
- for staticdirname in staticdirnames:
- if not path.isdir(staticdirname):
- self.warn('static directory %r does not exist' % staticdirname)
+ themeentries = [path.join(themepath, 'static')
+ for themepath in self.theme.get_dirchain()[::-1]]
+ for entry in themeentries:
+ copy_static_entry(entry, path.join(self.outdir, '_static'),
+ self, self.globalcontext)
+ # then, copy over all user-supplied static files
+ staticentries = [path.join(self.confdir, spath)
+ for spath in self.config.html_static_path]
+ matchers = compile_matchers(
+ self.config.exclude_patterns +
+ ['**/' + d for d in self.config.exclude_dirnames]
+ )
+ for entry in staticentries:
+ if not path.exists(entry):
+ self.warn('html_static_path entry %r does not exist' % entry)
continue
- for filename in os.listdir(staticdirname):
- if filename.startswith('.'):
- continue
- fullname = path.join(staticdirname, filename)
- targetname = path.join(self.outdir, '_static', filename)
- copy_static_entry(fullname, targetname, self,
- self.globalcontext)
- # last, copy logo file (handled differently)
+ copy_static_entry(entry, path.join(self.outdir, '_static'), self,
+ self.globalcontext, exclude_matchers=matchers)
+ # copy logo and favicon files if not already in static path
if self.config.html_logo:
logobase = path.basename(self.config.html_logo)
- copyfile(path.join(self.confdir, self.config.html_logo),
- path.join(self.outdir, '_static', logobase))
+ logotarget = path.join(self.outdir, '_static', logobase)
+ if not path.isfile(logotarget):
+ copyfile(path.join(self.confdir, self.config.html_logo),
+ logotarget)
+ if self.config.html_favicon:
+ iconbase = path.basename(self.config.html_favicon)
+ icontarget = path.join(self.outdir, '_static', iconbase)
+ if not path.isfile(icontarget):
+ copyfile(path.join(self.confdir, self.config.html_favicon),
+ icontarget)
# write build info file
fp = open(path.join(self.outdir, '.buildinfo'), 'w')
@@ -658,6 +670,33 @@ class StandaloneHTMLBuilder(Builder):
def get_outfilename(self, pagename):
return path.join(self.outdir, os_path(pagename) + self.out_suffix)
+ def get_sidebars(self, pagename):
+ def has_wildcard(pattern):
+ return any(char in pattern for char in '*?[')
+ sidebars = None
+ matched = None
+ for pattern, patsidebars in self.config.html_sidebars.iteritems():
+ if patmatch(pagename, pattern):
+ if matched:
+ if has_wildcard(pattern):
+ # warn if both patterns contain wildcards
+ if has_wildcard(matched):
+ self.warn('page %s matches two patterns in '
+ 'html_sidebars: %r and %r' %
+ (pagename, matched, pattern))
+ # else the already matched pattern is more specific
+ # than the present one, because it contains no wildcard
+ continue
+ matched = pattern
+ sidebars = patsidebars
+ if sidebars is None:
+ sidebars = self.default_sidebars
+ elif isinstance(sidebars, basestring):
+ # 0.x compatible mode: insert custom sidebar before searchbox
+ sidebars = self.default_sidebars[:-1] + [sidebars] + \
+ self.default_sidebars[-1:]
+ return sidebars
+
# --------- these are overwritten by the serialization builder
def get_target_uri(self, docname, typ=None):
@@ -677,9 +716,9 @@ class StandaloneHTMLBuilder(Builder):
return uri
ctx['pathto'] = pathto
ctx['hasdoc'] = lambda name: name in self.env.all_docs
- ctx['customsidebar'] = self.config.html_sidebars.get(pagename)
ctx['encoding'] = encoding = self.config.html_output_encoding
ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw)
+ ctx['sidebars'] = self.get_sidebars(pagename)
ctx.update(addctx)
self.app.emit('html-page-context', pagename, templatename,
@@ -803,9 +842,7 @@ class SerializingHTMLBuilder(StandaloneHTMLBuilder):
def handle_page(self, pagename, ctx, templatename='page.html',
outfilename=None, event_arg=None):
ctx['current_page_name'] = pagename
- sidebarfile = self.config.html_sidebars.get(pagename)
- if sidebarfile:
- ctx['customsidebar'] = sidebarfile
+ ctx['sidebars'] = self.get_sidebars(pagename)
if not outfilename:
outfilename = path.join(self.outdir,
diff --git a/sphinx/config.py b/sphinx/config.py
index d14a03f6c..23e5698b1 100644
--- a/sphinx/config.py
+++ b/sphinx/config.py
@@ -38,8 +38,9 @@ class Config(object):
master_doc = ('contents', 'env'),
source_suffix = ('.rst', 'env'),
source_encoding = ('utf-8-sig', 'env'),
+ exclude_patterns = ([], 'env'),
+ # the next three are all deprecated now
unused_docs = ([], 'env'),
- exclude_dirs = ([], 'env'),
exclude_trees = ([], 'env'),
exclude_dirnames = ([], 'env'),
default_role = (None, 'env'),
diff --git a/sphinx/environment.py b/sphinx/environment.py
index 3ae42bd54..09d15db3d 100644
--- a/sphinx/environment.py
+++ b/sphinx/environment.py
@@ -35,7 +35,8 @@ from docutils.transforms.parts import ContentsFilter
from sphinx import addnodes
from sphinx.util import movefile, get_matching_docs, SEP, ustrftime, \
- docname_join, FilenameUniqDict, url_re, make_refnode, clean_astext
+ docname_join, FilenameUniqDict, url_re, make_refnode, clean_astext, \
+ compile_matchers
from sphinx.errors import SphinxError, ExtensionError
@@ -416,14 +417,15 @@ class BuildEnvironment:
"""
Find all source files in the source dir and put them in self.found_docs.
"""
- exclude_dirs = [d.replace(SEP, path.sep) for d in config.exclude_dirs]
- exclude_trees = [d.replace(SEP, path.sep) for d in config.exclude_trees]
+ matchers = compile_matchers(
+ config.exclude_patterns[:] +
+ config.exclude_trees +
+ [d + config.source_suffix for d in config.unused_docs] +
+ ['**/' + d for d in config.exclude_dirnames] +
+ ['**/_sources']
+ )
self.found_docs = set(get_matching_docs(
- self.srcdir, config.source_suffix,
- exclude_docs=set(config.unused_docs),
- exclude_dirs=exclude_dirs,
- exclude_trees=exclude_trees,
- exclude_dirnames=['_sources'] + config.exclude_dirnames))
+ self.srcdir, config.source_suffix, exclude_matchers=matchers))
def get_outdated_files(self, config_changed):
"""
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py
index 51103b5ad..faea2c2ed 100644
--- a/sphinx/quickstart.py
+++ b/sphinx/quickstart.py
@@ -84,12 +84,9 @@ release = '%(release_str)s'
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%%B %%d, %%Y'
-# List of documents that shouldn't be included in the build.
-#unused_docs = []
-
-# List of directories, relative to source directory, that shouldn't be searched
-# for source files.
-exclude_trees = [%(exclude_trees)s]
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = [%(exclude_patterns)s]
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
@@ -743,10 +740,10 @@ directly.'''
mkdir_p(srcdir)
if d['sep']:
builddir = path.join(d['path'], 'build')
- d['exclude_trees'] = ''
+ d['exclude_patterns'] = ''
else:
builddir = path.join(srcdir, d['dot'] + 'build')
- d['exclude_trees'] = repr(d['dot'] + 'build')
+ d['exclude_patterns'] = repr(d['dot'] + 'build')
mkdir_p(builddir)
mkdir_p(path.join(srcdir, d['dot'] + 'templates'))
mkdir_p(path.join(srcdir, d['dot'] + 'static'))
diff --git a/sphinx/themes/agogo/layout.html b/sphinx/themes/agogo/layout.html
index d8b9d57ed..736363762 100644
--- a/sphinx/themes/agogo/layout.html
+++ b/sphinx/themes/agogo/layout.html
@@ -1,3 +1,13 @@
+{#
+ agogo/layout.html
+ ~~~~~~~~~~~~~~~~~
+
+ Sphinx layout template for the agogo theme, originally written
+ by Andi Albrecht.
+
+ :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+#}
{% extends "basic/layout.html" %}
{% block header %}
diff --git a/sphinx/themes/agogo/static/agogo.css_t b/sphinx/themes/agogo/static/agogo.css_t
index ab257f56d..4dd03d922 100644
--- a/sphinx/themes/agogo/static/agogo.css_t
+++ b/sphinx/themes/agogo/static/agogo.css_t
@@ -1,3 +1,14 @@
+/*
+ * agogo.css_t
+ * ~~~~~~~~~~~
+ *
+ * Sphinx stylesheet -- agogo theme.
+ *
+ * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
* {
margin: 0px;
padding: 0px;
diff --git a/sphinx/themes/basic/defindex.html b/sphinx/themes/basic/defindex.html
index 40f4f4c90..f337faece 100644
--- a/sphinx/themes/basic/defindex.html
+++ b/sphinx/themes/basic/defindex.html
@@ -1,3 +1,12 @@
+{#
+ basic/defindex.html
+ ~~~~~~~~~~~~~~~~~~~
+
+ Default template for the "index" page.
+
+ :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+#}
{% extends "layout.html" %}
{% set title = _('Overview') %}
{% block body %}
diff --git a/sphinx/themes/basic/genindex-single.html b/sphinx/themes/basic/genindex-single.html
index 9aaaeb0ca..1e98ba9c9 100644
--- a/sphinx/themes/basic/genindex-single.html
+++ b/sphinx/themes/basic/genindex-single.html
@@ -1,36 +1,38 @@
+{#
+ basic/genindex-single.html
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Template for a "single" page of a split index.
+
+ :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+#}
{% extends "layout.html" %}
{% set title = _('Index') %}
{% block body %}
{% trans key=key %}Index – {{ key }}{% endtrans %}
-
-
-{%- set breakat = count // 2 %}
-{%- set numcols = 1 %}
-{%- set numitems = 0 %}
-{% for entryname, (links, subitems) in entries %}
-
{%- if links -%}{{ entryname|e }}
- {%- for link in links[1:] %}, [{{ loop.index }}]{% endfor -%}
- {%- else -%}
-{{ entryname|e }}
- {%- endif -%}
- {%- if subitems %}
-
+
+ {%- for column in entries|slice(2) if column %}
+
+ {%- for entryname, (links, subitems) in column %}
+
- From here you can search these documents. Enter your search
- words into the box below and click "search". Note that the search
- function will automatically search for all of the words. Pages
- containing less words won't appear in the result list.
-
-
- {% if search_performed %}
-
Search Results
- {% if not search_results %}
-
Your search did not match any results.
- {% endif %}
- {% endif %}
-
- {% if search_results %}
-
- {% for href, caption, context in search_results %}
-