diff --git a/.gitignore b/.gitignore index a125b27..9e1febf 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ dist/ paramiko.egg-info/ test.log docs/ +!sites/docs _build diff --git a/site/_static/logo.png b/sites/_shared_static/logo.png similarity index 100% rename from site/_static/logo.png rename to sites/_shared_static/logo.png diff --git a/sites/docs/conf.py b/sites/docs/conf.py new file mode 100644 index 0000000..0c7ffe5 --- /dev/null +++ b/sites/docs/conf.py @@ -0,0 +1,4 @@ +# Obtain shared config values +import os, sys +sys.path.append(os.path.abspath('..')) +from shared_conf import * diff --git a/sites/docs/index.rst b/sites/docs/index.rst new file mode 100644 index 0000000..08b3432 --- /dev/null +++ b/sites/docs/index.rst @@ -0,0 +1,6 @@ +Welcome to Paramiko's documentation! +==================================== + +This site covers Paramiko's usage & API documentation. For basic info on what +Paramiko is, including its public changelog & how the project is maintained, +please see `the main website `_. diff --git a/site/_templates/rss.xml b/sites/main/_templates/rss.xml similarity index 100% rename from site/_templates/rss.xml rename to sites/main/_templates/rss.xml diff --git a/site/blog.py b/sites/main/blog.py similarity index 100% rename from site/blog.py rename to sites/main/blog.py diff --git a/site/blog.rst b/sites/main/blog.rst similarity index 100% rename from site/blog.rst rename to sites/main/blog.rst diff --git a/site/blog/first-post.rst b/sites/main/blog/first-post.rst similarity index 100% rename from site/blog/first-post.rst rename to sites/main/blog/first-post.rst diff --git a/site/blog/second-post.rst b/sites/main/blog/second-post.rst similarity index 100% rename from site/blog/second-post.rst rename to sites/main/blog/second-post.rst diff --git a/sites/main/conf.py b/sites/main/conf.py new file mode 100644 index 0000000..0c7ffe5 --- /dev/null +++ b/sites/main/conf.py @@ -0,0 +1,4 @@ +# Obtain shared config values +import os, sys +sys.path.append(os.path.abspath('..')) +from shared_conf import * diff --git a/site/contact.rst b/sites/main/contact.rst similarity index 100% rename from site/contact.rst rename to sites/main/contact.rst diff --git a/site/contributing.rst b/sites/main/contributing.rst similarity index 100% rename from site/contributing.rst rename to sites/main/contributing.rst diff --git a/site/index.rst b/sites/main/index.rst similarity index 100% rename from site/index.rst rename to sites/main/index.rst diff --git a/site/installing.rst b/sites/main/installing.rst similarity index 100% rename from site/installing.rst rename to sites/main/installing.rst diff --git a/site/conf.py b/sites/shared_conf.py similarity index 92% rename from site/conf.py rename to sites/shared_conf.py index 8c6f3aa..333db54 100644 --- a/site/conf.py +++ b/sites/shared_conf.py @@ -13,7 +13,8 @@ rss_description = 'Paramiko project news' # Alabaster theme html_theme_path = [alabaster.get_path()] -html_static_path = ['_static'] +# Paths relative to invoking conf.py - not this shared file +html_static_path = ['../_shared_static'] html_theme = 'alabaster' html_theme_options = { 'logo': 'logo.png', diff --git a/tasks.py b/tasks.py index d470dab..e8cbd3e 100644 --- a/tasks.py +++ b/tasks.py @@ -6,15 +6,15 @@ from invocations import docs, testing api = Collection.from_module(docs) # TODO: maybe allow rolling configuration into it too heh api.configure({ - 'sphinx.source': 'api', - 'sphinx.target': 'api/_build', + 'sphinx.source': 'sites/docs', + 'sphinx.target': 'sites/docs/_build', }) -api.name = 'api' -site = Collection.from_module(docs) -site.name = 'site' -site.configure({ - 'sphinx.source': 'site', - 'sphinx.target': 'site/_build', +api.name = 'docs' +main = Collection.from_module(docs) +main.name = 'main' +main.configure({ + 'sphinx.source': 'sites/main', + 'sphinx.target': 'sites/main/_build', }) -ns = Collection(testing.test, api=api, site=site) +ns = Collection(testing.test, docs=api, main=main)