Merge remote-tracking branch 'tonysyu/versions-in-sidebar' into tonysyu-versions-in-sidebar

This commit is contained in:
Stefan van der Walt
2012-02-08 01:24:30 -08:00
3 changed files with 34 additions and 1 deletions
+17
View File
@@ -0,0 +1,17 @@
function insert_version_links() {
var labels = ['0.5dev', '0.4', '0.3'];
var links = ['http://scikits-image.org/docs/dev/index.html',
'http://scikits-image.org/docs/0.4/index.html',
'http://scikits-image.org/docs/0.3/index.html'];
document.write('<ul class="versions">\n');
for (i = 0; i < labels.length; i++){
document.write('<li> <a href="URL">skimage VERSION</a> </li>\n'
.replace('VERSION', labels[i])
.replace('URL', links[i]));
}
document.write('</ul>\n');
}
+10
View File
@@ -0,0 +1,10 @@
{%- block versions %}
<h3>Version</h3>
<script type="text/javascript" src="_static/docversions.js"></script>
<script type="text/javascript">
insert_version_links();
</script>
{%- endblock %}
+7 -1
View File
@@ -150,7 +150,13 @@ html_static_path = ['_static']
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
html_sidebars = {
'**': ['localtoc.html',
'relations.html',
'sourcelink.html',
'versions.html',
'searchbox.html'],
}
# Additional templates that should be rendered to pages, maps page names to
# template names.