From 7cc84b5688d14891db180c68afb14a28f6caf36a Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Tue, 7 Feb 2012 21:32:43 -0500 Subject: [PATCH 1/4] 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. From 87a0fd1abbda4eb64720a62bbada4bf499e80183 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Wed, 8 Feb 2012 01:40:56 -0800 Subject: [PATCH 2/4] DOC: Refactor Javascript for listing doc versions to only have the version in one place. --- doc/source/_static/docversions.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/doc/source/_static/docversions.js b/doc/source/_static/docversions.js index f7929166..5570c4ef 100644 --- a/doc/source/_static/docversions.js +++ b/doc/source/_static/docversions.js @@ -1,17 +1,12 @@ - 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']; + var labels = ['dev', '0.4', '0.3']; document.write('\n'); } - From eb3d218fb10e96c62ad472f868b5090728f281d9 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Wed, 8 Feb 2012 01:41:14 -0800 Subject: [PATCH 3/4] PKG: Update release instructions to update doc versions javascript. --- RELEASE.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/RELEASE.txt b/RELEASE.txt index 87334d74..9fcc6d1c 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -3,7 +3,10 @@ How to make a new release of ``skimage`` - Update release notes. - Update the version number in setup.py and commit -- Update the docs and api, push upstream using "make gh-pages" +- Update the docs: + - Edit ``doc/_source/_static/docversions.js`` + - Build a clean version of the docs with ``rm build -rf; make html``. + - Push upstream using "make gh-pages" - Add the version number as a tag in git:: git tag v0.5 @@ -21,5 +24,5 @@ How to make a new release of ``skimage`` - Update the web frontpage. The webpage is kept in a separate repo: scikits-image-web -- Post release notes on mailing lists. +- Post release notes on mailing lists, blog, G+, etc. From 4d3443f2afdf3ae08883049c9be33000c3cce9f3 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Wed, 8 Feb 2012 01:58:03 -0800 Subject: [PATCH 4/4] DOC: Use absolute path to versions javascript. --- doc/source/_templates/versions.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/_templates/versions.html b/doc/source/_templates/versions.html index 4dc3d03e..f3ab452f 100644 --- a/doc/source/_templates/versions.html +++ b/doc/source/_templates/versions.html @@ -2,7 +2,7 @@

Version

- +