Changeset 826 for trunk/docs


Ignore:
Timestamp:
Feb 6, 2016, 2:27:09 PM (4 years ago)
Author:
cito
Message:

Make Sphinx docs work without the Cloud theme

Our custom navigation bar on the page header works only with the Cloud theme,
so we use a toc as the start page when creating the docs without Cloud theme.

Location:
trunk/docs
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/about.rst

    r818 r826  
    1 **PyGreSQL** is an *open-source* `Python <http://www.python.org>`_ module
    2 that interfaces to a `PostgreSQL <http://www.postgresql.org>`_ database.
    3 It embeds the PostgreSQL query library to allow easy use of the powerful
    4 PostgreSQL features from a Python script.
     1About PyGreSQL
     2==============
    53
    6     | This software is copyright © 1995, Pascal Andre.
    7     | Further modifications are copyright © 1997-2008 by D'Arcy J.M. Cain.
    8     | Further modifications are copyright © 2009-2016 by the PyGreSQL team.
    9     | For licensing details, see the full :doc:`copyright`.
    10 
    11 **PostgreSQL** is a highly scalable, SQL compliant, open source
    12 object-relational database management system. With more than 20 years
    13 of development history, it is quickly becoming the de facto database
    14 for enterprise level open source solutions.
    15 Best of all, PostgreSQL's source code is available under the most liberal
    16 open source license: the BSD license.
    17 
    18 **Python** Python is an interpreted, interactive, object-oriented
    19 programming language. It is often compared to Tcl, Perl, Scheme or Java.
    20 Python combines remarkable power with very clear syntax. It has modules,
    21 classes, exceptions, very high level dynamic data types, and dynamic typing.
    22 There are interfaces to many system calls and libraries, as well as to
    23 various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules
    24 are easily written in C or C++. Python is also usable as an extension
    25 language for applications that need a programmable interface.
    26 The Python implementation is copyrighted but freely usable and distributable,
    27 even for commercial use.
    28 
    29 **PyGreSQL** is a Python module that interfaces to a PostgreSQL database.
    30 It embeds the PostgreSQL query library to allow easy use of the powerful
    31 PostgreSQL features from a Python script or application.
    32 
    33 PyGreSQL is developed and tested on a NetBSD system, but it also runs on
    34 most other platforms where PostgreSQL and Python is running.  It is based
    35 on the PyGres95 code written by Pascal Andre (andre@chimay.via.ecp.fr).
    36 D'Arcy (darcy@druid.net) renamed it to PyGreSQL starting with
    37 version 2.0 and serves as the "BDFL" of PyGreSQL.
    38 
    39 The current version PyGreSQL 5.0 needs PostgreSQL 9.0 or newer and Python 2.6,
    40 2.7 or 3.3 to 3.5. If you need to support older PostgreSQL versions or older
    41 Python 2.x versions, you can resort to PyGreSQL 4.x that still supports them.
     4.. include:: about.txt
  • trunk/docs/conf.py

    r752 r826  
    1616import shlex
    1717
    18 # import Cloud theme
    19 # this will also automatically add the theme directory
    20 import cloud_sptheme
     18# Import Cloud theme (this will also automatically add the theme directory).
     19# Note: We add a navigation bar to the cloud them using a custom layout.
     20try:
     21    import cloud_sptheme
     22    use_cloud_theme = True
     23except ImportError:
     24    use_cloud_theme = False
    2125
    2226# If extensions (or modules to document with autodoc) are in another directory,
     
    3539
    3640# Add any paths that contain templates here, relative to this directory.
    37 templates_path = ['_templates']
     41templates_path = ['_templates'] if use_cloud_theme else []
    3842
    3943# The suffix(es) of source filenames.
     
    4650
    4751# The master toctree document.
    48 master_doc = 'index'
     52master_doc = 'index' if use_cloud_theme else 'toc'
    4953
    5054# General information about the project.
     
    8084# List of pages which are included in other pages and therefore should
    8185# not appear in the toctree.
    82 exclude_patterns += ['about.rst',
     86exclude_patterns += [
    8387    'download/download.rst', 'download/files.rst',
    8488    'community/mailinglist.rst', 'community/source.rst',
    8589    'community/bugtracker.rst', 'community/support.rst',
    8690    'community/homes.rst']
     91if use_cloud_theme:
     92    # We use a naviagtion bar instead of the table of contents
     93    # and we include the about page on the index page.
     94    exclude_patterns += ['toc.rst', 'about.rst']
     95else:
     96    exclude_patterns += ['index.rst']
    8797
    8898# The reST default role (used for this markup: `text`) for all documents.
     
    118128# The theme to use for HTML and HTML Help pages.  See the documentation for
    119129# a list of builtin themes.
    120 html_theme = 'cloud'
     130html_theme = 'cloud' if use_cloud_theme else 'default'
    121131
    122132# Theme options are theme-specific and customize the look and feel of a theme
    123133# further.  For a list of options available for each theme, see the
    124134# documentation.
    125 html_theme_options = {'defaultcollapsed': True}
     135html_theme_options = {'defaultcollapsed': True} if use_cloud_theme else {}
    126136
    127137# Add any paths that contain custom themes here, relative to this directory.
  • trunk/docs/download/download.rst

    r758 r826  
    1 Download PyGreSQL here:
    2 -----------------------
     1Current PyGreSQL versions
     2-------------------------
    33
    44You can find PyGreSQL on the **Python Package Index** at
     
    2020  * http://pygresql.org/files/PyGreSQL-5.0.win32-py2.7.exe
    2121
    22 Older PyGreSQL versions:
    23 ------------------------
     22Older PyGreSQL versions
     23-----------------------
    2424
    2525You can look for older PyGreSQL versions at
  • trunk/docs/index.rst

    r710 r826  
    1313    community/index
    1414
    15 .. include:: about.rst
     15.. include:: about.txt
Note: See TracChangeset for help on using the changeset viewer.