mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge bugfix from 0.5.
This commit is contained in:
commit
14b401be1e
4
CHANGES
4
CHANGES
@ -6,7 +6,7 @@ New features added
|
|||||||
|
|
||||||
* Configuration:
|
* Configuration:
|
||||||
|
|
||||||
- The new ``html_add_permalinks`` config value can be used to
|
- The new ``html_add_permalinks`` config value can be used to
|
||||||
switch off the generated "paragraph sign" permalinks for each
|
switch off the generated "paragraph sign" permalinks for each
|
||||||
heading and definition environment.
|
heading and definition environment.
|
||||||
|
|
||||||
@ -24,6 +24,8 @@ New features added
|
|||||||
Release 0.5.1 (in development)
|
Release 0.5.1 (in development)
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
|
* Fix the JavaScript search when html_copy_source is off.
|
||||||
|
|
||||||
* Fix a bug in autodoc when documenting classes with the option.
|
* Fix a bug in autodoc when documenting classes with the option.
|
||||||
``autoclass_content = "both"`` set.
|
``autoclass_content = "both"`` set.
|
||||||
|
|
||||||
|
@ -402,6 +402,12 @@ that use Sphinx' HTMLWriter class.
|
|||||||
If true, the reST sources are included in the HTML build as
|
If true, the reST sources are included in the HTML build as
|
||||||
:file:`_sources/{name}`. The default is ``True``.
|
:file:`_sources/{name}`. The default is ``True``.
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
If this config value is set to ``False``, the JavaScript search function
|
||||||
|
will only display the titles of matching documents, and no excerpt from
|
||||||
|
the matching contents.
|
||||||
|
|
||||||
.. confval:: html_use_opensearch
|
.. confval:: html_use_opensearch
|
||||||
|
|
||||||
If nonempty, an `OpenSearch <http://opensearch.org>` description file will be
|
If nonempty, an `OpenSearch <http://opensearch.org>` description file will be
|
||||||
|
@ -141,6 +141,7 @@ class StandaloneHTMLBuilder(Builder):
|
|||||||
docstitle = self.config.html_title,
|
docstitle = self.config.html_title,
|
||||||
shorttitle = self.config.html_short_title,
|
shorttitle = self.config.html_short_title,
|
||||||
show_sphinx = self.config.html_show_sphinx,
|
show_sphinx = self.config.html_show_sphinx,
|
||||||
|
has_source = self.config.html_copy_source,
|
||||||
file_suffix = self.out_suffix,
|
file_suffix = self.out_suffix,
|
||||||
script_files = self.script_files,
|
script_files = self.script_files,
|
||||||
sphinx_version = __version__,
|
sphinx_version = __version__,
|
||||||
|
@ -431,7 +431,7 @@ var Search = {
|
|||||||
listItem.slideDown(5, function() {
|
listItem.slideDown(5, function() {
|
||||||
displayNextItem();
|
displayNextItem();
|
||||||
});
|
});
|
||||||
} else {
|
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
|
||||||
$.get('_sources/' + item[0] + '.txt', function(data) {
|
$.get('_sources/' + item[0] + '.txt', function(data) {
|
||||||
listItem.append($.makeSearchSummary(data, searchterms, hlterms));
|
listItem.append($.makeSearchSummary(data, searchterms, hlterms));
|
||||||
Search.output.append(listItem);
|
Search.output.append(listItem);
|
||||||
@ -439,6 +439,12 @@ var Search = {
|
|||||||
displayNextItem();
|
displayNextItem();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
// no source available, just display title
|
||||||
|
Search.output.append(listItem);
|
||||||
|
listItem.slideDown(5, function() {
|
||||||
|
displayNextItem();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// search finished, update title and status message
|
// search finished, update title and status message
|
||||||
|
@ -105,10 +105,11 @@
|
|||||||
{%- if builder != 'htmlhelp' %}
|
{%- if builder != 'htmlhelp' %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '{{ pathto("", 1) }}',
|
URL_ROOT: '{{ pathto("", 1) }}',
|
||||||
VERSION: '{{ release|e }}',
|
VERSION: '{{ release|e }}',
|
||||||
COLLAPSE_MODINDEX: false,
|
COLLAPSE_MODINDEX: false,
|
||||||
FILE_SUFFIX: '{{ file_suffix }}'
|
FILE_SUFFIX: '{{ file_suffix }}',
|
||||||
|
HAS_SOURCE: {{ has_source|lower }}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
{%- for scriptfile in script_files %}
|
{%- for scriptfile in script_files %}
|
||||||
|
Loading…
Reference in New Issue
Block a user