From 2da914252064af8dc419b49a423ab57fdb0617c4 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Tue, 21 Jan 2014 16:59:21 -0800 Subject: [PATCH] Rename 'main' doctree to 'www'; refactor sphinx task conf --- sites/{main => www}/_templates/rss.xml | 0 sites/{main => www}/blog.py | 0 sites/{main => www}/blog.rst | 0 sites/{main => www}/blog/first-post.rst | 0 sites/{main => www}/blog/second-post.rst | 0 sites/{main => www}/conf.py | 0 sites/{main => www}/contact.rst | 0 sites/{main => www}/contributing.rst | 0 sites/{main => www}/index.rst | 0 sites/{main => www}/installing.rst | 0 tasks.py | 29 +++++++++++++++--------- 11 files changed, 18 insertions(+), 11 deletions(-) rename sites/{main => www}/_templates/rss.xml (100%) rename sites/{main => www}/blog.py (100%) rename sites/{main => www}/blog.rst (100%) rename sites/{main => www}/blog/first-post.rst (100%) rename sites/{main => www}/blog/second-post.rst (100%) rename sites/{main => www}/conf.py (100%) rename sites/{main => www}/contact.rst (100%) rename sites/{main => www}/contributing.rst (100%) rename sites/{main => www}/index.rst (100%) rename sites/{main => www}/installing.rst (100%) diff --git a/sites/main/_templates/rss.xml b/sites/www/_templates/rss.xml similarity index 100% rename from sites/main/_templates/rss.xml rename to sites/www/_templates/rss.xml diff --git a/sites/main/blog.py b/sites/www/blog.py similarity index 100% rename from sites/main/blog.py rename to sites/www/blog.py diff --git a/sites/main/blog.rst b/sites/www/blog.rst similarity index 100% rename from sites/main/blog.rst rename to sites/www/blog.rst diff --git a/sites/main/blog/first-post.rst b/sites/www/blog/first-post.rst similarity index 100% rename from sites/main/blog/first-post.rst rename to sites/www/blog/first-post.rst diff --git a/sites/main/blog/second-post.rst b/sites/www/blog/second-post.rst similarity index 100% rename from sites/main/blog/second-post.rst rename to sites/www/blog/second-post.rst diff --git a/sites/main/conf.py b/sites/www/conf.py similarity index 100% rename from sites/main/conf.py rename to sites/www/conf.py diff --git a/sites/main/contact.rst b/sites/www/contact.rst similarity index 100% rename from sites/main/contact.rst rename to sites/www/contact.rst diff --git a/sites/main/contributing.rst b/sites/www/contributing.rst similarity index 100% rename from sites/main/contributing.rst rename to sites/www/contributing.rst diff --git a/sites/main/index.rst b/sites/www/index.rst similarity index 100% rename from sites/main/index.rst rename to sites/www/index.rst diff --git a/sites/main/installing.rst b/sites/www/installing.rst similarity index 100% rename from sites/main/installing.rst rename to sites/www/installing.rst diff --git a/tasks.py b/tasks.py index 3326a77..c716415 100644 --- a/tasks.py +++ b/tasks.py @@ -1,16 +1,23 @@ +from os.path import join + from invoke import Collection -from invocations import docs, testing +from invocations import docs as _docs, testing -# Usage doc/API site -api = Collection.from_module(docs, name='docs', config={ - 'sphinx.source': 'sites/docs', - 'sphinx.target': 'sites/docs/_build', -}) -# Main/about/changelog site -main = Collection.from_module(docs, name='main', config={ - 'sphinx.source': 'sites/main', - 'sphinx.target': 'sites/main/_build', +d = 'sites' + +# Usage doc/API site (published as docs.paramiko.org) +path = join(d, 'docs') +docs = Collection.from_module(_docs, name='docs', config={ + 'sphinx.source': path, + 'sphinx.target': join(path, '_build'), }) -ns = Collection(testing.test, docs=api, main=main) +# Main/about/changelog site ((www.)?paramiko.org) +path = join(d, 'www') +www = Collection.from_module(_docs, name='www', config={ + 'sphinx.source': path, + 'sphinx.target': join(path, '_build'), +}) + +ns = Collection(testing.test, docs=docs, www=www)