Skip to content

Commit

Permalink
show doc warning if not on rtd
Browse files Browse the repository at this point in the history
  • Loading branch information
jobovy committed Dec 26, 2014
1 parent 9c64e20 commit cbc7c0a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/source/conf.py
Expand Up @@ -22,7 +22,7 @@

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.mathjax']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.mathjax','sphinx.ext.ifconfig']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down Expand Up @@ -52,6 +52,9 @@
if on_rtd:
version= 'v'+version
release= 'v'+release
def setup(app):
app.add_config_value('not_on_rtd',True,True)
not_on_rtd= not on_rtd

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 4 additions & 0 deletions doc/source/index.rst
Expand Up @@ -3,6 +3,10 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. ifconfig:: not_on_rtd

.. WARNING:: You are looking at the rarely updated, GitHub version of this documentation, **please go to** `galpy.readthedocs.org <http://galpy.readthedocs.org>`_ **for the latest documentation**.

Welcome to galpy's documentation
=================================

Expand Down

0 comments on commit cbc7c0a

Please sign in to comment.