From 7cc84b5688d14891db180c68afb14a28f6caf36a Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Tue, 7 Feb 2012 21:32:43 -0500 Subject: [PATCH] DOC: Add sidebar section listing package versions. --- doc/source/_static/docversions.js | 17 +++++++++++++++++ doc/source/_templates/versions.html | 10 ++++++++++ doc/source/conf.py | 8 +++++++- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 doc/source/_static/docversions.js create mode 100644 doc/source/_templates/versions.html diff --git a/doc/source/_static/docversions.js b/doc/source/_static/docversions.js new file mode 100644 index 00000000..f7929166 --- /dev/null +++ b/doc/source/_static/docversions.js @@ -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('\n'); +} + diff --git a/doc/source/_templates/versions.html b/doc/source/_templates/versions.html new file mode 100644 index 00000000..4dc3d03e --- /dev/null +++ b/doc/source/_templates/versions.html @@ -0,0 +1,10 @@ +{%- block versions %} + +

Version

+ + + + +{%- endblock %} diff --git a/doc/source/conf.py b/doc/source/conf.py index 6d5efbe1..5bc957ba 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -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.