mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
merge with 0.6
This commit is contained in:
commit
9fca66a690
10
CHANGES
10
CHANGES
@ -154,6 +154,16 @@ Features added
|
|||||||
- Added Danish translation, thanks to Hjorth Larsen.
|
- Added Danish translation, thanks to Hjorth Larsen.
|
||||||
|
|
||||||
|
|
||||||
|
Release 0.6.8 (in development)
|
||||||
|
==============================
|
||||||
|
|
||||||
|
* #445: Fix links to result pages when using the search function
|
||||||
|
of HTML built with the ``dirhtml`` builder.
|
||||||
|
|
||||||
|
* #444: In templates, properly re-escape values treated with the
|
||||||
|
"striptags" Jinja filter.
|
||||||
|
|
||||||
|
|
||||||
Release 0.6.7 (Jun 05, 2010)
|
Release 0.6.7 (Jun 05, 2010)
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
@ -800,6 +800,10 @@ class DirectoryHTMLBuilder(StandaloneHTMLBuilder):
|
|||||||
|
|
||||||
return outfilename
|
return outfilename
|
||||||
|
|
||||||
|
def prepare_writing(self, docnames):
|
||||||
|
StandaloneHTMLBuilder.prepare_writing(self, docnames)
|
||||||
|
self.globalcontext['no_search_suffix'] = True
|
||||||
|
|
||||||
|
|
||||||
class SingleFileHTMLBuilder(StandaloneHTMLBuilder):
|
class SingleFileHTMLBuilder(StandaloneHTMLBuilder):
|
||||||
"""
|
"""
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
<div class="rel">
|
<div class="rel">
|
||||||
{%- for rellink in rellinks %}
|
{%- for rellink in rellinks %}
|
||||||
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}"
|
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags|e }}"
|
||||||
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
|
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
|
||||||
{%- if not loop.last %}{{ reldelim2 }}{% endif %}
|
{%- if not loop.last %}{{ reldelim2 }}{% endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
@ -68,7 +68,7 @@
|
|||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
{%- for rellink in rellinks %}
|
{%- for rellink in rellinks %}
|
||||||
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}"
|
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags|e }}"
|
||||||
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
|
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
|
||||||
{%- if not loop.last %}{{ reldelim2 }}{% endif %}
|
{%- if not loop.last %}{{ reldelim2 }}{% endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
{%- for rellink in rellinks %}
|
{%- for rellink in rellinks %}
|
||||||
<li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}>
|
<li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}>
|
||||||
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}"
|
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags|e }}"
|
||||||
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
|
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
|
||||||
{%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
|
{%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
@ -88,7 +88,7 @@
|
|||||||
{%- set titlesuffix = "" %}
|
{%- set titlesuffix = "" %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- block htmltitle %}
|
{%- block htmltitle %}
|
||||||
<title>{{ title|striptags }}{{ titlesuffix }}</title>
|
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
|
||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
|
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
|
||||||
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
|
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
|
||||||
@ -101,7 +101,7 @@
|
|||||||
URL_ROOT: '{{ url_root }}',
|
URL_ROOT: '{{ url_root }}',
|
||||||
VERSION: '{{ release|e }}',
|
VERSION: '{{ release|e }}',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '{{ file_suffix }}',
|
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
|
||||||
HAS_SOURCE: {{ has_source|lower }}
|
HAS_SOURCE: {{ has_source|lower }}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -132,13 +132,13 @@
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" />
|
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" />
|
||||||
{%- if parents %}
|
{%- if parents %}
|
||||||
<link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}" />
|
<link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}" />
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if next %}
|
{%- if next %}
|
||||||
<link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}" />
|
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if prev %}
|
{%- if prev %}
|
||||||
<link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}" />
|
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
{%- block extrahead %} {% endblock %}
|
{%- block extrahead %} {% endblock %}
|
||||||
|
@ -456,10 +456,23 @@ var Search = {
|
|||||||
if (results.length) {
|
if (results.length) {
|
||||||
var item = results.pop();
|
var item = results.pop();
|
||||||
var listItem = $('<li style="display:none"></li>');
|
var listItem = $('<li style="display:none"></li>');
|
||||||
listItem.append($('<a/>').attr(
|
if (DOCUMENTATION_OPTIONS.FILE_SUFFIX == '') {
|
||||||
'href',
|
// dirhtml builder
|
||||||
|
var dirname = item[0] + '/';
|
||||||
|
if (dirname.match(/\/index\/$/)) {
|
||||||
|
dirname = dirname.substring(0, dirname.length-6);
|
||||||
|
} else if (dirname == 'index/') {
|
||||||
|
dirname = '';
|
||||||
|
}
|
||||||
|
listItem.append($('<a/>').attr('href',
|
||||||
|
DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
|
||||||
|
highlightstring + item[2]).html(item[1]));
|
||||||
|
} else {
|
||||||
|
// normal html builders
|
||||||
|
listItem.append($('<a/>').attr('href',
|
||||||
item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
|
item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
|
||||||
highlightstring + item[2]).html(item[1]));
|
highlightstring + item[2]).html(item[1]));
|
||||||
|
}
|
||||||
if (item[3]) {
|
if (item[3]) {
|
||||||
listItem.append($('<span> (' + item[3] + ')</span>'));
|
listItem.append($('<span> (' + item[3] + ')</span>'));
|
||||||
Search.output.append(listItem);
|
Search.output.append(listItem);
|
||||||
@ -472,10 +485,10 @@ var Search = {
|
|||||||
if (data != '') {
|
if (data != '') {
|
||||||
listItem.append($.makeSearchSummary(data, searchterms, hlterms));
|
listItem.append($.makeSearchSummary(data, searchterms, hlterms));
|
||||||
Search.output.append(listItem);
|
Search.output.append(listItem);
|
||||||
|
}
|
||||||
listItem.slideDown(5, function() {
|
listItem.slideDown(5, function() {
|
||||||
displayNextItem();
|
displayNextItem();
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// no source available, just display title
|
// no source available, just display title
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
<h1 class="heading"><a href="{{ pathto('index') }}">
|
<h1 class="heading"><a href="{{ pathto('index') }}">
|
||||||
<span>{{ shorttitle|e }}</span></a></h1>
|
<span>{{ shorttitle|e }}</span></a></h1>
|
||||||
<h2 class="heading"><span>{{ title|striptags }}</span></h2>
|
<h2 class="heading"><span>{{ title|striptags|e }}</span></h2>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<div id="content">
|
<div id="content">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h1 class="heading"><a href="{{ pathto('index') }}"
|
<h1 class="heading"><a href="{{ pathto('index') }}"
|
||||||
title="back to the documentation overview"><span>{{ title|striptags }}</span></a></h1>
|
title="back to the documentation overview"><span>{{ title|striptags|e }}</span></a></h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="relnav">
|
<div class="relnav">
|
||||||
{%- if prev %}
|
{%- if prev %}
|
||||||
|
Loading…
Reference in New Issue
Block a user