source: trunk/docs/conf.py @ 842

Last change on this file since 842 was 832, checked in by cito, 4 years ago

Minor fixes in the docs configuration

  • Property svn:keywords set to Author Date Id Revision
File size: 10.0 KB
Line 
1# -*- coding: utf-8 -*-
2#
3# PyGreSQL documentation build configuration file.
4#
5# This file is execfile()d with the current directory set to its
6# containing dir.
7#
8# Note that not all possible configuration values are present in this
9# autogenerated file.
10#
11# All configuration values have a default; values that are commented out
12# serve to show the default.
13
14import sys
15import os
16import shlex
17import shutil
18
19# Import Cloud theme (this will also automatically add the theme directory).
20# Note: We add a navigation bar to the cloud them using a custom layout.
21if os.environ.get('READTHEDOCS', None) == 'True':
22    # We cannot use our custom layout here, since RTD overrides layout.html.
23    use_cloud_theme = False
24else:
25    try:
26        import cloud_sptheme
27        use_cloud_theme = True
28    except ImportError:
29        use_cloud_theme = False
30
31shutil.copyfile('start.txt' if use_cloud_theme else 'toc.txt', 'index.rst')
32
33# If extensions (or modules to document with autodoc) are in another directory,
34# add these directories to sys.path here. If the directory is relative to the
35# documentation root, use os.path.abspath to make it absolute, like shown here.
36#sys.path.insert(0, os.path.abspath('.'))
37
38# -- General configuration ------------------------------------------------
39
40# If your documentation needs a minimal Sphinx version, state it here.
41#needs_sphinx = '1.0'
42
43# Add any Sphinx extension module names here, as strings. They can be
44# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
45extensions = ['sphinx.ext.autodoc']
46
47# Add any paths that contain templates here, relative to this directory.
48templates_path = ['_templates'] if use_cloud_theme else []
49
50# The suffix(es) of source filenames.
51# You can specify multiple suffix as a list of string:
52# source_suffix = ['.rst', '.md']
53source_suffix = '.rst'
54
55# The encoding of source files.
56#source_encoding = 'utf-8-sig'
57
58# The master toctree document.
59master_doc = 'index'
60
61# General information about the project.
62project = 'PyGreSQL'
63author = 'The PyGreSQL team'
64copyright = '2016, ' + author
65
66# The version info for the project you're documenting, acts as replacement for
67# |version| and |release|, also used in various other places throughout the
68# built documents.
69#
70# The short X.Y version.
71version = '5.0'
72# The full version, including alpha/beta/rc tags.
73release = '5.0'
74
75# The language for content autogenerated by Sphinx. Refer to documentation
76# for a list of supported languages.
77# This is also used if you do content translation via gettext catalogs.
78# Usually you set "language" from the command line for these cases.
79language = None
80
81# There are two options for replacing |today|: either, you set today to some
82# non-false value, then it is used:
83#today = ''
84# Else, today_fmt is used as the format for a strftime call.
85#today_fmt = '%B %d, %Y'
86
87# List of patterns, relative to source directory, that match files and
88# directories to ignore when looking for source files.
89exclude_patterns = ['_build']
90
91# List of pages which are included in other pages and therefore should
92# not appear in the toctree.
93exclude_patterns += [
94    'download/download.rst', 'download/files.rst',
95    'community/mailinglist.rst', 'community/source.rst',
96    'community/bugtracker.rst', 'community/support.rst',
97    'community/homes.rst']
98
99# The reST default role (used for this markup: `text`) for all documents.
100#default_role = None
101
102# If true, '()' will be appended to :func: etc. cross-reference text.
103#add_function_parentheses = True
104
105# If true, the current module name will be prepended to all description
106# unit titles (such as .. function::).
107#add_module_names = True
108
109# If true, sectionauthor and moduleauthor directives will be shown in the
110# output. They are ignored by default.
111#show_authors = False
112
113# The name of the Pygments (syntax highlighting) style to use.
114pygments_style = 'sphinx'
115
116# A list of ignored prefixes for module index sorting.
117#modindex_common_prefix = []
118
119
120# If true, keep warnings as "system message" paragraphs in the built documents.
121#keep_warnings = False
122
123# If true, `todo` and `todoList` produce output, else they produce nothing.
124todo_include_todos = False
125
126
127# -- Options for HTML output ----------------------------------------------
128
129# The theme to use for HTML and HTML Help pages.  See the documentation for
130# a list of builtin themes.
131html_theme = 'cloud' if use_cloud_theme else 'default'
132
133# Theme options are theme-specific and customize the look and feel of a theme
134# further.  For a list of options available for each theme, see the
135# documentation.
136if use_cloud_theme:
137    html_theme_options = {
138        'roottarget': 'contents/index',
139        'defaultcollapsed': True,
140        'shaded_decor': True}
141else:
142    html_theme_options = {}
143
144# Add any paths that contain custom themes here, relative to this directory.
145html_theme_path = ['_themes']
146
147# The name for this set of Sphinx documents.  If None, it defaults to
148# "<project> v<release> documentation".
149html_title = 'PyGreSQL %s' % version
150if use_cloud_theme:
151    html_title += ' documentation'
152
153# A shorter title for the navigation bar.  Default is the same as html_title.
154#html_short_title = None
155
156# The name of an image file (relative to this directory) to place at the top
157# of the sidebar.
158html_logo = '_static/pygresql.png'
159
160# The name of an image file (within the static path) to use as favicon of the
161# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
162# pixels large.
163html_favicon = '_static/favicon.ico'
164
165# Add any paths that contain custom static files (such as style sheets) here,
166# relative to this directory. They are copied after the builtin static files,
167# so a file named "default.css" will overwrite the builtin "default.css".
168html_static_path = ['_static']
169
170# Add any extra paths that contain custom files (such as robots.txt or
171# .htaccess) here, relative to this directory. These files are copied
172# directly to the root of the documentation.
173#html_extra_path = []
174
175# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
176# using the given strftime format.
177#html_last_updated_fmt = '%b %d, %Y'
178
179# If true, SmartyPants will be used to convert quotes and dashes to
180# typographically correct entities.
181#html_use_smartypants = True
182
183# Custom sidebar templates, maps document names to template names.
184#html_sidebars = {}
185
186# Additional templates that should be rendered to pages, maps page names to
187# template names.
188#html_additional_pages = {}
189
190# If false, no module index is generated.
191#html_domain_indices = True
192
193# If false, no index is generated.
194#html_use_index = True
195
196# If true, the index is split into individual pages for each letter.
197#html_split_index = False
198
199# If true, links to the reST sources are added to the pages.
200#html_show_sourcelink = True
201
202# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
203#html_show_sphinx = True
204
205# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
206#html_show_copyright = True
207
208# If true, an OpenSearch description file will be output, and all pages will
209# contain a <link> tag referring to it.  The value of this option must be the
210# base URL from which the finished HTML is served.
211#html_use_opensearch = ''
212
213# This is the file name suffix for HTML files (e.g. ".xhtml").
214#html_file_suffix = None
215
216# Language to be used for generating the HTML full-text search index.
217# Sphinx supports the following languages:
218#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
219#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
220#html_search_language = 'en'
221
222# A dictionary with options for the search language support, empty by default.
223# Now only 'ja' uses this config value
224#html_search_options = {'type': 'default'}
225
226# The name of a javascript file (relative to the configuration directory) that
227# implements a search results scorer. If empty, the default will be used.
228#html_search_scorer = 'scorer.js'
229
230# Output file base name for HTML help builder.
231htmlhelp_basename = 'PyGreSQLdoc'
232
233
234# -- Options for LaTeX output ---------------------------------------------
235
236latex_elements = {
237# The paper size ('letterpaper' or 'a4paper').
238#'papersize': 'letterpaper',
239
240# The font size ('10pt', '11pt' or '12pt').
241#'pointsize': '10pt',
242
243# Additional stuff for the LaTeX preamble.
244#'preamble': '',
245
246# Latex figure (float) alignment
247#'figure_align': 'htbp',
248}
249
250# Grouping the document tree into LaTeX files. List of tuples
251# (source start file, target name, title,
252#  author, documentclass [howto, manual, or own class]).
253latex_documents = [
254    (master_doc, 'PyGreSQL.tex', 'PyGreSQL Documentation',
255     author, 'manual'),
256]
257
258# The name of an image file (relative to this directory) to place at the top of
259# the title page.
260#latex_logo = None
261
262# For "manual" documents, if this is true, then toplevel headings are parts,
263# not chapters.
264#latex_use_parts = False
265
266# If true, show page references after internal links.
267#latex_show_pagerefs = False
268
269# If true, show URL addresses after external links.
270#latex_show_urls = False
271
272# Documents to append as an appendix to all manuals.
273#latex_appendices = []
274
275# If false, no module index is generated.
276#latex_domain_indices = True
277
278
279# -- Options for manual page output ---------------------------------------
280
281# One entry per manual page. List of tuples
282# (source start file, name, description, authors, manual section).
283man_pages = [
284    (master_doc, 'pygresql', 'PyGreSQL Documentation', [author], 1)
285]
286
287# If true, show URL addresses after external links.
288#man_show_urls = False
289
290
291# -- Options for Texinfo output -------------------------------------------
292
293# Grouping the document tree into Texinfo files. List of tuples
294# (source start file, target name, title, author,
295#  dir menu entry, description, category)
296texinfo_documents = [
297    (master_doc, 'PyGreSQL', u'PyGreSQL Documentation',
298     author, 'PyGreSQL', 'One line description of project.',
299     'Miscellaneous'),
300]
301
302# Documents to append as an appendix to all manuals.
303#texinfo_appendices = []
304
305# If false, no module index is generated.
306#texinfo_domain_indices = True
307
308# How to display URL addresses: 'footnote', 'no', or 'inline'.
309#texinfo_show_urls = 'footnote'
310
311# If true, do not generate a @detailmenu in the "Top" node's menu.
312#texinfo_no_detailmenu = False
Note: See TracBrowser for help on using the repository browser.