SimTk/mdtraj — pull request #584 by rmcgibbo (2014-09-08 01:47:36+00:00)
Title: Version dropdown in docs

This change makes the version dropdown work correctly, by defaulting to the version of the docs you're actually navigating to. Deploying this change requires updating all of the past releases docs, i've been using this script locally.

The idea is to check out the old versions from git, but get the _new_ sphinx theme including this change, and then rebuild. This should be a one time thing -- new releases shouldn't need to change the HTML for the old docs, except for this one time.

```
rmcgibbo@vspm9 ~/local ()
$ cat build-old-docs.sh
set -x
rm -rf docs-output
mkdir -p docs-output
wd=`pwd`

cd mdtraj
RELEASES=`wget -qO- https://api.github.com/repos/SimTk/mdtraj/releases | jq -r '.[] | .tag_name '`
for r in $RELEASES;
do
conda create -n docs-build --yes numpy scipy cython openmm ipython-notebook pip matplotlib scikit-learn sphinx==1.2.3 pytables nose pandas
source activate docs-build
pip install numpydoc runipy==0.0.4

git clean -xdf
git reset --hard $r
git checkout origin/js-version-docs docs/conf.py
git checkout origin/js-version-docs docs/themes
git checkout origin/js-version-docs docs/sphinxext
python setup.py install

cd docs
make html
mv _build $wd/docs-output/$r
cd -

source deactivate
conda remove -n docs-build --all --yes
exit

done;
```