diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2014-01-23 11:43:34 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2014-01-23 15:36:03 -0800 |
commit | 87cd72c144c54fc9c6f05ff7482bd6e9e7622730 (patch) | |
tree | bc168eea14f29c64b27fa25f968885d7c58ba036 | |
parent | dde21a7de09bd92a6a362a26009a56a942b3d246 (diff) |
Set up Intersphinx so www can ref docs
-rw-r--r-- | sites/shared_conf.py | 2 | ||||
-rw-r--r-- | sites/www/conf.py | 25 |
2 files changed, 21 insertions, 6 deletions
diff --git a/sites/shared_conf.py b/sites/shared_conf.py index 89e0a56d..c48dcdce 100644 --- a/sites/shared_conf.py +++ b/sites/shared_conf.py @@ -42,7 +42,7 @@ html_sidebars = { # Regular settings project = u'Paramiko' year = datetime.now().year -copyright = u'%d Jeff Forcier, 2003-2012 Robey Pointer' % year +copyright = u'2013-%d Jeff Forcier, 2003-2012 Robey Pointer' % year master_doc = 'index' templates_path = ['_templates'] exclude_trees = ['_build'] diff --git a/sites/www/conf.py b/sites/www/conf.py index c144b5b4..b2f96186 100644 --- a/sites/www/conf.py +++ b/sites/www/conf.py @@ -1,15 +1,30 @@ # Obtain shared config values -import os, sys -sys.path.append(os.path.abspath('..')) +import sys +import os +from os.path import abspath, join, dirname + +sys.path.append(abspath(join(dirname(__file__), '..'))) from shared_conf import * -# Add local blog extension -sys.path.append(os.path.abspath('.')) +# Local blog extension +sys.path.append(abspath('.')) extensions = ['blog'] rss_link = 'http://paramiko.org' rss_description = 'Paramiko project news' -# Add Releases changelog extension +# Releases changelog extension extensions.append('releases') releases_release_uri = "https://github.com/paramiko/paramiko/tree/%s" releases_issue_uri = "https://github.com/paramiko/paramiko/issues/%s" + +# Intersphinx for referencing API/usage docs +extensions.append('sphinx.ext.intersphinx') +# Default is 'local' building, but reference the public docs site when building +# under RTD. +target = join(dirname(__file__), '..', 'docs', '_build') +if os.environ.get('READTHEDOCS') == 'True': + # TODO: switch to docs.paramiko.org post go-live + target = 'http://paramiko-docs.readthedocs.org/en/latest/' +intersphinx_mapping = { + 'docs': (target, None), +} |