Author: cito
Date: Sat Feb 6 17:14:05 2016
New Revision: 831
Log:
Use different file instead of ifconfig
Unfortunately, Sphinx did not regard ifconfig when parsing the toc,
so it could not be used. Instead, we simply copy a different file.
Added:
branches/4.x/docs/start.txt
branches/4.x/docs/toc.txt
trunk/docs/start.txt
trunk/docs/toc.txt
Modified:
branches/4.x/docs/conf.py
branches/4.x/docs/index.rst
trunk/docs/conf.py
trunk/docs/index.rst
Modified: branches/4.x/docs/conf.py
==============================================================================
--- branches/4.x/docs/conf.py Sat Feb 6 16:47:07 2016 (r830)
+++ branches/4.x/docs/conf.py Sat Feb 6 17:14:05 2016 (r831)
@@ -14,6 +14,7 @@
import sys
import os
import shlex
+import shutil
# Import Cloud theme (this will also automatically add the theme directory).
# Note: We add a navigation bar to the cloud them using a custom layout.
@@ -27,6 +28,8 @@
except ImportError:
use_cloud_theme = False
+shutil.copyfile('start.txt' if use_cloud_theme else 'toc.txt', 'index.rst')
+
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -142,7 +145,9 @@
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
-html_title = None if use_cloud_theme else 'PyGreSQL %s' % version
+html_title = 'PyGreSQL %s' % version
+if use_cloud_theme:
+ html_title += ' documentation'
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
Modified: branches/4.x/docs/index.rst
==============================================================================
--- branches/4.x/docs/index.rst Sat Feb 6 16:47:07 2016 (r830)
+++ branches/4.x/docs/index.rst Sat Feb 6 17:14:05 2016 (r831)
@@ -1,29 +1,15 @@
-.. PyGreSQL documentation master file
+.. PyGreSQL index page without toc (for use with cloud theme)
Welcome to PyGreSQL
===================
-.. ifconfig:: html_theme != 'cloud'
+.. toctree::
+ :hidden:
- .. toctree::
- :maxdepth: 2
+ copyright
+ announce
+ download/index
+ contents/index
+ community/index
- about
- copyright
- announce
- download/index
- contents/index
- community/index
-
-.. ifconfig:: html_theme == 'cloud'
-
- .. toctree::
- :hidden:
-
- copyright
- announce
- download/index
- contents/index
- community/index
-
- .. include:: about.txt
+.. include:: about.txt
\ No newline at end of file
Added: branches/4.x/docs/start.txt
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/4.x/docs/start.txt Sat Feb 6 17:14:05 2016 (r831)
@@ -0,0 +1,15 @@
+.. PyGreSQL index page without toc (for use with cloud theme)
+
+Welcome to PyGreSQL
+===================
+
+.. toctree::
+ :hidden:
+
+ copyright
+ announce
+ download/index
+ contents/index
+ community/index
+
+.. include:: about.txt
\ No newline at end of file
Added: branches/4.x/docs/toc.txt
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/4.x/docs/toc.txt Sat Feb 6 17:14:05 2016 (r831)
@@ -0,0 +1,14 @@
+.. PyGreSQL index page with toc (for use without cloud theme)
+
+Welcome to PyGreSQL
+===================
+
+.. toctree::
+ :maxdepth: 2
+
+ about
+ copyright
+ announce
+ download/index
+ contents/index
+ community/index
\ No newline at end of file
Modified: trunk/docs/conf.py
==============================================================================
--- trunk/docs/conf.py Sat Feb 6 16:47:07 2016 (r830)
+++ trunk/docs/conf.py Sat Feb 6 17:14:05 2016 (r831)
@@ -14,6 +14,7 @@
import sys
import os
import shlex
+import shutil
# Import Cloud theme (this will also automatically add the theme directory).
# Note: We add a navigation bar to the cloud them using a custom layout.
@@ -27,6 +28,8 @@
except ImportError:
use_cloud_theme = False
+shutil.copyfile('start.txt' if use_cloud_theme else 'toc.txt', 'index.rst')
+
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -39,7 +42,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.ifconfig']
+extensions = ['sphinx.ext.autodoc']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] if use_cloud_theme else []
@@ -137,7 +140,9 @@
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
-html_title = None if use_cloud_theme else 'PyGreSQL %s' % version
+html_title = 'PyGreSQL %s' % version
+if use_cloud_theme:
+ html_title += ' documentation'
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
Modified: trunk/docs/index.rst
==============================================================================
--- trunk/docs/index.rst Sat Feb 6 16:47:07 2016 (r830)
+++ trunk/docs/index.rst Sat Feb 6 17:14:05 2016 (r831)
@@ -1,29 +1,15 @@
-.. PyGreSQL documentation master file
+.. PyGreSQL index page without toc (for use with cloud theme)
Welcome to PyGreSQL
===================
-.. ifconfig:: html_theme != 'cloud'
+.. toctree::
+ :hidden:
- .. toctree::
- :maxdepth: 2
+ copyright
+ announce
+ download/index
+ contents/index
+ community/index
- about
- copyright
- announce
- download/index
- contents/index
- community/index
-
-.. ifconfig:: html_theme == 'cloud'
-
- .. toctree::
- :hidden:
-
- copyright
- announce
- download/index
- contents/index
- community/index
-
- .. include:: about.txt
+.. include:: about.txt
\ No newline at end of file
Added: trunk/docs/start.txt
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/docs/start.txt Sat Feb 6 17:14:05 2016 (r831)
@@ -0,0 +1,15 @@
+.. PyGreSQL index page without toc (for use with cloud theme)
+
+Welcome to PyGreSQL
+===================
+
+.. toctree::
+ :hidden:
+
+ copyright
+ announce
+ download/index
+ contents/index
+ community/index
+
+.. include:: about.txt
\ No newline at end of file
Added: trunk/docs/toc.txt
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/docs/toc.txt Sat Feb 6 17:14:05 2016 (r831)
@@ -0,0 +1,14 @@
+.. PyGreSQL index page with toc (for use without cloud theme)
+
+Welcome to PyGreSQL
+===================
+
+.. toctree::
+ :maxdepth: 2
+
+ about
+ copyright
+ announce
+ download/index
+ contents/index
+ community/index
\ No newline at end of file
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql