From 3bd886ef801591d72ca735ba4e3b5e2cfcf313b8 2015-09-26 00:57:33 From: Matthias Bussonnier Date: 2015-09-26 00:57:33 Subject: [PATCH] Allow to rebuild docs with Warning this is an old version. --- diff --git a/docs/Makefile b/docs/Makefile index cae3a1d..e491cd6 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -147,6 +147,8 @@ gh-pages: clean html # if VERSION is unspecified, it will be dev # For releases, VERSION should be just the major version, # e.g. VERSION=2 make gh-pages + # use ARCHIVE=1 VERSION=3 gh-pages to build the + # docs with a warning that this is not stable docs anymore. python gh-pages.py $(VERSION) texinfo: diff --git a/docs/source/conf.py b/docs/source/conf.py index bf56e4f..e359cb5 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -78,6 +78,15 @@ if iprelease['_version_extra'] == 'dev': """ +elif os.environ.get('ARCHIVE', None): + rst_prolog = """ + .. warning:: + + This documentation is for an old version of IPython. + You can find docs for newer versions `here `_. + + """ + # The master toctree document. master_doc = 'index'