Skip to content

Commit

Permalink
Always use index.rst as master page
Browse files Browse the repository at this point in the history
Implement the case distinction on the home page with ifconfig.
  • Loading branch information
Cito committed Feb 6, 2016
1 parent 9eeb273 commit fd99189
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 30 deletions.
10 changes: 2 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,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']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.ifconfig']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] if use_cloud_theme else []
Expand All @@ -53,7 +53,7 @@
#source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index' if use_cloud_theme else 'toc'
master_doc = 'index'

# General information about the project.
project = 'PyGreSQL'
Expand Down Expand Up @@ -92,12 +92,6 @@
'community/mailinglist.rst', 'community/source.rst',
'community/bugtracker.rst', 'community/support.rst',
'community/homes.rst']
if use_cloud_theme:
# We use a naviagtion bar instead of the table of contents
# and we include the about page on the index page.
exclude_patterns += ['toc.rst', 'about.rst']
else:
exclude_patterns += ['index.rst']

# The reST default role (used for this markup: `text`) for all documents.
#default_role = None
Expand Down
30 changes: 22 additions & 8 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,27 @@
Welcome to PyGreSQL
===================

.. toctree::
:hidden:
.. ifconfig:: html_theme != 'cloud'

copyright
announce
download/index
contents/index
community/index
.. toctree::
:maxdepth: 2

.. include:: about.txt
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
14 changes: 0 additions & 14 deletions docs/toc.rst

This file was deleted.

0 comments on commit fd99189

Please sign in to comment.