From ccb7a6c2cd22689d363a03da2c7a2bcf4e27a0c8 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Mon, 13 Jan 2014 12:17:46 -0800 Subject: Start fleshing out two-site setup --- sites/shared_conf.py | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 sites/shared_conf.py (limited to 'sites/shared_conf.py') diff --git a/sites/shared_conf.py b/sites/shared_conf.py new file mode 100644 index 00000000..333db542 --- /dev/null +++ b/sites/shared_conf.py @@ -0,0 +1,56 @@ +from datetime import datetime +import os +import sys + +import alabaster + + +# Add local blog extension +sys.path.append(os.path.abspath('.')) +extensions = ['blog'] +rss_link = 'http://paramiko.org' +rss_description = 'Paramiko project news' + +# Alabaster theme +html_theme_path = [alabaster.get_path()] +# Paths relative to invoking conf.py - not this shared file +html_static_path = ['../_shared_static'] +html_theme = 'alabaster' +html_theme_options = { + 'logo': 'logo.png', + 'logo_name': 'true', + 'description': "A Python implementation of SSHv2.", + 'github_user': 'paramiko', + 'github_repo': 'paramiko', + 'gittip_user': 'bitprophet', + 'analytics_id': 'UA-18486793-2', + + 'link': '#3782BE', + 'link_hover': '#3782BE', + +} +html_sidebars = { + # Landing page (no ToC) + 'index': [ + 'about.html', + 'searchbox.html', + 'donate.html', + ], + # Inner pages get a ToC + '**': [ + 'about.html', + 'localtoc.html', + 'searchbox.html', + 'donate.html', + ] +} + +# Regular settings +project = u'Paramiko' +year = datetime.now().year +copyright = u'%d Jeff Forcier, 2003-2012 Robey Pointer' % year +master_doc = 'index' +templates_path = ['_templates'] +exclude_trees = ['_build'] +source_suffix = '.rst' +default_role = 'obj' -- cgit v1.2.3 From 5a1f927310414ca47408c3f2f81a0b43beb8cb19 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Wed, 22 Jan 2014 10:55:39 -0800 Subject: Blog only used/exists in www, don't import it in docs site --- sites/shared_conf.py | 6 ------ sites/www/conf.py | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'sites/shared_conf.py') diff --git a/sites/shared_conf.py b/sites/shared_conf.py index 333db542..89e0a56d 100644 --- a/sites/shared_conf.py +++ b/sites/shared_conf.py @@ -5,12 +5,6 @@ import sys import alabaster -# Add local blog extension -sys.path.append(os.path.abspath('.')) -extensions = ['blog'] -rss_link = 'http://paramiko.org' -rss_description = 'Paramiko project news' - # Alabaster theme html_theme_path = [alabaster.get_path()] # Paths relative to invoking conf.py - not this shared file diff --git a/sites/www/conf.py b/sites/www/conf.py index 0c7ffe55..e504ec7b 100644 --- a/sites/www/conf.py +++ b/sites/www/conf.py @@ -2,3 +2,10 @@ import os, sys sys.path.append(os.path.abspath('..')) from shared_conf import * + +# Add local blog extension +sys.path.append(os.path.abspath('.')) +extensions = ['blog'] +rss_link = 'http://paramiko.org' +rss_description = 'Paramiko project news' + -- cgit v1.2.3 From 87cd72c144c54fc9c6f05ff7482bd6e9e7622730 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Thu, 23 Jan 2014 11:43:34 -0800 Subject: Set up Intersphinx so www can ref docs --- sites/shared_conf.py | 2 +- sites/www/conf.py | 25 ++++++++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) (limited to 'sites/shared_conf.py') 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), +} -- cgit v1.2.3 From 69d40710dc55373f9bbeb9f2721c6942a5250bbd Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Tue, 28 Jan 2014 08:46:21 -0800 Subject: Tweak logo settings (& rely on new alabaster defaults) --- dev-requirements.txt | 2 +- sites/shared_conf.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'sites/shared_conf.py') diff --git a/dev-requirements.txt b/dev-requirements.txt index a2b9a4e8..a967765c 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -3,5 +3,5 @@ invoke>=0.6.1 invocations>=0.4.4 sphinx>=1.1.3 -alabaster>=0.1.0 +alabaster>=0.2.0 releases>=0.2.4 diff --git a/sites/shared_conf.py b/sites/shared_conf.py index c48dcdce..d6852cc7 100644 --- a/sites/shared_conf.py +++ b/sites/shared_conf.py @@ -11,8 +11,6 @@ html_theme_path = [alabaster.get_path()] html_static_path = ['../_shared_static'] html_theme = 'alabaster' html_theme_options = { - 'logo': 'logo.png', - 'logo_name': 'true', 'description': "A Python implementation of SSHv2.", 'github_user': 'paramiko', 'github_repo': 'paramiko', -- cgit v1.2.3 From da51cd8b14231a3fa9850d0d1b939168ae7b0534 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Tue, 28 Jan 2014 12:50:19 -0800 Subject: Update to new alabaster-driven nav sidebar --- sites/shared_conf.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'sites/shared_conf.py') diff --git a/sites/shared_conf.py b/sites/shared_conf.py index d6852cc7..267b3bc2 100644 --- a/sites/shared_conf.py +++ b/sites/shared_conf.py @@ -17,21 +17,18 @@ html_theme_options = { 'gittip_user': 'bitprophet', 'analytics_id': 'UA-18486793-2', + 'extra_nav_links': { + "API Docs": 'http://docs.paramiko.org', + }, + 'link': '#3782BE', 'link_hover': '#3782BE', } html_sidebars = { - # Landing page (no ToC) - 'index': [ - 'about.html', - 'searchbox.html', - 'donate.html', - ], - # Inner pages get a ToC '**': [ 'about.html', - 'localtoc.html', + 'navigation.html', 'searchbox.html', 'donate.html', ] -- cgit v1.2.3 From 2b0f834c1660c8865300e27b46a85de2edf4d556 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Wed, 29 Jan 2014 14:23:46 -0800 Subject: Move API doc sister link to www site only, derp --- sites/shared_conf.py | 5 ----- sites/www/conf.py | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sites/shared_conf.py') diff --git a/sites/shared_conf.py b/sites/shared_conf.py index 267b3bc2..2b98654f 100644 --- a/sites/shared_conf.py +++ b/sites/shared_conf.py @@ -17,13 +17,8 @@ html_theme_options = { 'gittip_user': 'bitprophet', 'analytics_id': 'UA-18486793-2', - 'extra_nav_links': { - "API Docs": 'http://docs.paramiko.org', - }, - 'link': '#3782BE', 'link_hover': '#3782BE', - } html_sidebars = { '**': [ diff --git a/sites/www/conf.py b/sites/www/conf.py index b2f96186..58132d70 100644 --- a/sites/www/conf.py +++ b/sites/www/conf.py @@ -28,3 +28,8 @@ if os.environ.get('READTHEDOCS') == 'True': intersphinx_mapping = { 'docs': (target, None), } + +# Sister-site links to API docs +html_theme_options['extra_nav_links'] = { + "API Docs": 'http://docs.paramiko.org', +} -- cgit v1.2.3 From 0f2fb262870d080d872bb4dd9689d2faf75545ee Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Mon, 3 Feb 2014 14:09:56 -0800 Subject: Update to new Alabaster version for footer/extension stuff --- dev-requirements.txt | 2 +- sites/shared_conf.py | 3 ++- sites/www/conf.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'sites/shared_conf.py') diff --git a/dev-requirements.txt b/dev-requirements.txt index 2fe1e778..e9770f4f 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -3,5 +3,5 @@ invoke>=0.7.0 invocations>=0.4.4 sphinx>=1.1.3 -alabaster>=0.2.0 +alabaster>=0.3.0 releases>=0.2.4 diff --git a/sites/shared_conf.py b/sites/shared_conf.py index 2b98654f..ca555ca5 100644 --- a/sites/shared_conf.py +++ b/sites/shared_conf.py @@ -5,8 +5,9 @@ import sys import alabaster -# Alabaster theme +# Alabaster theme + mini-extension html_theme_path = [alabaster.get_path()] +extensions = ['alabaster'] # Paths relative to invoking conf.py - not this shared file html_static_path = ['../_shared_static'] html_theme = 'alabaster' diff --git a/sites/www/conf.py b/sites/www/conf.py index 1f11c1e2..481acdff 100644 --- a/sites/www/conf.py +++ b/sites/www/conf.py @@ -8,7 +8,7 @@ from shared_conf import * # Local blog extension sys.path.append(abspath('.')) -extensions = ['blog'] +extensions.append('blog') rss_link = 'http://paramiko.org' rss_description = 'Paramiko project news' -- cgit v1.2.3 From cdf62655cbddbc68b42f58984eb60906a253cca0 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Mon, 3 Feb 2014 14:10:23 -0800 Subject: Simplify www page footer. Robey copyright remains in source code but this site is brand new & the footer was real noisy. Eh. --- sites/shared_conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sites/shared_conf.py') diff --git a/sites/shared_conf.py b/sites/shared_conf.py index ca555ca5..86ecdfe8 100644 --- a/sites/shared_conf.py +++ b/sites/shared_conf.py @@ -33,7 +33,7 @@ html_sidebars = { # Regular settings project = u'Paramiko' year = datetime.now().year -copyright = u'2013-%d Jeff Forcier, 2003-2012 Robey Pointer' % year +copyright = u'%d Jeff Forcier' % year master_doc = 'index' templates_path = ['_templates'] exclude_trees = ['_build'] -- cgit v1.2.3 From 073c71a8223ff77cacd8c555ef63ce24f0c3d50c Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 7 Mar 2014 18:46:40 -0800 Subject: Attempt to fix docs for py3 --- sites/shared_conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sites/shared_conf.py') diff --git a/sites/shared_conf.py b/sites/shared_conf.py index 86ecdfe8..52cec938 100644 --- a/sites/shared_conf.py +++ b/sites/shared_conf.py @@ -31,9 +31,9 @@ html_sidebars = { } # Regular settings -project = u'Paramiko' +project = 'Paramiko' year = datetime.now().year -copyright = u'%d Jeff Forcier' % year +copyright = '%d Jeff Forcier' % year master_doc = 'index' templates_path = ['_templates'] exclude_trees = ['_build'] -- cgit v1.2.3 From e1d92087fae4ba0404c40ef1ee383294777476b8 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Tue, 1 Apr 2014 11:13:26 -0700 Subject: Minor site cleanup --- sites/_shared_static/logo.png | Bin 6401 -> 0 bytes sites/shared_conf.py | 2 -- 2 files changed, 2 deletions(-) delete mode 100644 sites/_shared_static/logo.png (limited to 'sites/shared_conf.py') diff --git a/sites/_shared_static/logo.png b/sites/_shared_static/logo.png deleted file mode 100644 index bc76697e..00000000 Binary files a/sites/_shared_static/logo.png and /dev/null differ diff --git a/sites/shared_conf.py b/sites/shared_conf.py index 86ecdfe8..eb899834 100644 --- a/sites/shared_conf.py +++ b/sites/shared_conf.py @@ -1,6 +1,4 @@ from datetime import datetime -import os -import sys import alabaster -- cgit v1.2.3 From 658d202cc780f7cf536668cbca62601659369285 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Tue, 1 Apr 2014 13:28:54 -0700 Subject: This setting no longer needed & causes warnings if left in --- sites/shared_conf.py | 1 - 1 file changed, 1 deletion(-) (limited to 'sites/shared_conf.py') diff --git a/sites/shared_conf.py b/sites/shared_conf.py index eb899834..18c3bb4b 100644 --- a/sites/shared_conf.py +++ b/sites/shared_conf.py @@ -7,7 +7,6 @@ import alabaster html_theme_path = [alabaster.get_path()] extensions = ['alabaster'] # Paths relative to invoking conf.py - not this shared file -html_static_path = ['../_shared_static'] html_theme = 'alabaster' html_theme_options = { 'description': "A Python implementation of SSHv2.", -- cgit v1.2.3 From 4fe3ad2220996354b7f096cbd2d3000caf5cfdf0 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Sun, 6 Apr 2014 18:52:58 -0700 Subject: Nuke Fab-oriented link color override --- sites/shared_conf.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'sites/shared_conf.py') diff --git a/sites/shared_conf.py b/sites/shared_conf.py index c61ca638..c265fc49 100644 --- a/sites/shared_conf.py +++ b/sites/shared_conf.py @@ -14,9 +14,6 @@ html_theme_options = { 'github_repo': 'paramiko', 'gittip_user': 'bitprophet', 'analytics_id': 'UA-18486793-2', - - 'link': '#3782BE', - 'link_hover': '#3782BE', } html_sidebars = { '**': [ -- cgit v1.2.3 From a1c2a9829a620c3ace6ddc6187bf05262e10b137 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Mon, 14 Apr 2014 10:48:33 -0400 Subject: Errything uses intersphinx to Python --- sites/docs/conf.py | 7 +------ sites/shared_conf.py | 7 ++++++- sites/www/conf.py | 4 +--- 3 files changed, 8 insertions(+), 10 deletions(-) (limited to 'sites/shared_conf.py') diff --git a/sites/docs/conf.py b/sites/docs/conf.py index f9355715..5674fed1 100644 --- a/sites/docs/conf.py +++ b/sites/docs/conf.py @@ -5,16 +5,11 @@ sys.path.append(os.path.abspath('../..')) from shared_conf import * # Enable autodoc, intersphinx -extensions.extend(['sphinx.ext.autodoc', 'sphinx.ext.intersphinx']) +extensions.extend(['sphinx.ext.autodoc']) # Autodoc settings autodoc_default_flags = ['members', 'special-members'] -# Intersphinx connection to stdlib -intersphinx_mapping = { - 'python': ('http://docs.python.org/2.6', None), -} - # Sister-site links to WWW html_theme_options['extra_nav_links'] = { "Main website": 'http://www.paramiko.org', diff --git a/sites/shared_conf.py b/sites/shared_conf.py index c265fc49..e0afe92e 100644 --- a/sites/shared_conf.py +++ b/sites/shared_conf.py @@ -5,7 +5,7 @@ import alabaster # Alabaster theme + mini-extension html_theme_path = [alabaster.get_path()] -extensions = ['alabaster'] +extensions = ['alabaster', 'sphinx.ext.intersphinx'] # Paths relative to invoking conf.py - not this shared file html_theme = 'alabaster' html_theme_options = { @@ -24,6 +24,11 @@ html_sidebars = { ] } +# Everything intersphinx's to Python +intersphinx_mapping = { + 'python': ('http://docs.python.org/2.6', None), +} + # Regular settings project = 'Paramiko' year = datetime.now().year diff --git a/sites/www/conf.py b/sites/www/conf.py index 1c6c9254..c7828203 100644 --- a/sites/www/conf.py +++ b/sites/www/conf.py @@ -25,9 +25,7 @@ target = join(dirname(__file__), '..', 'docs', '_build') if os.environ.get('READTHEDOCS') == 'True': # TODO: switch to docs.paramiko.org post go-live of sphinx API docs target = 'http://docs.paramiko.org/en/latest/' -intersphinx_mapping = { - 'docs': (target, None), -} +intersphinx_mapping['docs'] = (target, None) # Sister-site links to API docs html_theme_options['extra_nav_links'] = { -- cgit v1.2.3 From 24309559bbdc4742a94854eb33c9d6047635497c Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Tue, 15 Apr 2014 15:04:46 -0400 Subject: Show Travis status in website sidebar --- sites/shared_conf.py | 1 + 1 file changed, 1 insertion(+) (limited to 'sites/shared_conf.py') diff --git a/sites/shared_conf.py b/sites/shared_conf.py index e0afe92e..69908388 100644 --- a/sites/shared_conf.py +++ b/sites/shared_conf.py @@ -14,6 +14,7 @@ html_theme_options = { 'github_repo': 'paramiko', 'gittip_user': 'bitprophet', 'analytics_id': 'UA-18486793-2', + 'travis_button': True, } html_sidebars = { '**': [ -- cgit v1.2.3 From 43c5cdaa3094c59718c8df69b1de834aee15485c Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 5 Sep 2014 10:12:40 -0700 Subject: s/gittip/gratipay/ --- dev-requirements.txt | 2 +- sites/shared_conf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sites/shared_conf.py') diff --git a/dev-requirements.txt b/dev-requirements.txt index a21a48ed..7a0ccbc5 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -4,6 +4,6 @@ tox>=1.4,<1.5 invoke>=0.7.0,<0.8 invocations>=0.5.0 sphinx>=1.1.3 -alabaster>=0.4.0 +alabaster>=0.6.1 releases>=0.5.2 wheel==0.23.0 diff --git a/sites/shared_conf.py b/sites/shared_conf.py index 69908388..4a6a5c4e 100644 --- a/sites/shared_conf.py +++ b/sites/shared_conf.py @@ -12,7 +12,7 @@ html_theme_options = { 'description': "A Python implementation of SSHv2.", 'github_user': 'paramiko', 'github_repo': 'paramiko', - 'gittip_user': 'bitprophet', + 'gratipay_user': 'bitprophet', 'analytics_id': 'UA-18486793-2', 'travis_button': True, } -- cgit v1.2.3