From cbeff90107d062a1e2345ce380344b650865d07e 2015-09-01 12:13:15 From: Matthias Bussonnier Date: 2015-09-01 12:13:15 Subject: [PATCH] Allow to rebuild docs with Warning this is an old version. --- diff --git a/docs/Makefile b/docs/Makefile index b3f16bf..2da354a 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -122,6 +122,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 eede658..99b19e6 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -75,6 +75,15 @@ if iprelease['_version_extra']: """ +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'