Changeset 831 for trunk/docs


Ignore:
Timestamp:
Feb 6, 2016, 5:14:05 PM (4 years ago)
Author:
cito
Message:

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.

Location:
trunk/docs
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/conf.py

    r830 r831  
    1515import os
    1616import shlex
     17import shutil
    1718
    1819# Import Cloud theme (this will also automatically add the theme directory).
     
    2829        use_cloud_theme = False
    2930
     31shutil.copyfile('start.txt' if use_cloud_theme else 'toc.txt', 'index.rst')
     32
    3033# If extensions (or modules to document with autodoc) are in another directory,
    3134# add these directories to sys.path here. If the directory is relative to the
     
    4043# Add any Sphinx extension module names here, as strings. They can be
    4144# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
    42 extensions = ['sphinx.ext.autodoc', 'sphinx.ext.ifconfig']
     45extensions = ['sphinx.ext.autodoc']
    4346
    4447# Add any paths that contain templates here, relative to this directory.
     
    138141# The name for this set of Sphinx documents.  If None, it defaults to
    139142# "<project> v<release> documentation".
    140 html_title = None if use_cloud_theme else 'PyGreSQL %s' % version
     143html_title = 'PyGreSQL %s' % version
     144if use_cloud_theme:
     145    html_title += ' documentation'
    141146
    142147# A shorter title for the navigation bar.  Default is the same as html_title.
  • trunk/docs/index.rst

    r829 r831  
    1 .. PyGreSQL documentation master file
     1.. PyGreSQL index page without toc (for use with cloud theme)
    22
    33Welcome to PyGreSQL
    44===================
    55
    6 .. ifconfig:: html_theme != 'cloud'
     6.. toctree::
     7    :hidden:
    78
    8     .. toctree::
    9         :maxdepth: 2
     9    copyright
     10    announce
     11    download/index
     12    contents/index
     13    community/index
    1014
    11         about
    12         copyright
    13         announce
    14         download/index
    15         contents/index
    16         community/index
    17 
    18 .. ifconfig:: html_theme == 'cloud'
    19 
    20     .. toctree::
    21         :hidden:
    22 
    23         copyright
    24         announce
    25         download/index
    26         contents/index
    27         community/index
    28 
    29     .. include:: about.txt
     15.. include:: about.txt
Note: See TracChangeset for help on using the changeset viewer.