python-guide
288 строк · 9.1 Кб
1# -*- coding: utf-8 -*-
2#
3# pythonguide documentation build configuration file, created by
4# sphinx-quickstart on Wed Aug 4 22:51:11 2010.
5#
6# This file is execfile()d with the current directory set to its 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 datetime15import os16import sys17
18# If extensions (or modules to document with autodoc) are in another directory,
19# add these directories to sys.path here. If the directory is relative to the
20# documentation root, use os.path.abspath to make it absolute, like shown here.
21sys.path.append(os.path.abspath('_themes'))22
23# -- General configuration -----------------------------------------------------
24
25# If your documentation needs a minimal Sphinx version, state it here.
26#needs_sphinx = '1.0'
27
28# Add any Sphinx extension module names here, as strings. They can be extensions
29# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
30extensions = [31'sphinx.ext.ifconfig',32'sphinx.ext.todo',33'sphinx.ext.intersphinx',34'sphinx.ext.doctest',35]
36
37# Add any paths that contain templates here, relative to this directory.
38templates_path = ['_templates']39
40# The suffix of source filenames.
41source_suffix = '.rst'42
43# The encoding of source files.
44#source_encoding = 'utf-8-sig'
45
46# The master toctree document.
47master_doc = 'index'48
49# General information about the project.
50current_year = datetime.datetime.now().year51project = u'pythonguide'52copyright = (u'2011-{} <a href="https://www.kennethreitz.org/projects">Kenneth Reitz</a>'53' & <a href="https://realpython.com">Real Python</a>.'54' <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">CC BY-NC-SA 3.0</a>').format(current_year)55
56# The version info for the project you're documenting, acts as replacement for
57# |version| and |release|, also used in various other places throughout the
58# built documents.
59#
60# The short X.Y version.
61version = '0.0.1'62# The full version, including alpha/beta/rc tags.
63release = '0.0.1'64
65# The language for content autogenerated by Sphinx. Refer to documentation
66# for a list of supported languages.
67#language = None
68
69# There are two options for replacing |today|: either, you set today to some
70# non-false value, then it is used:
71#today = ''
72# Else, today_fmt is used as the format for a strftime call.
73#today_fmt = '%B %d, %Y'
74
75# List of patterns, relative to source directory, that match files and
76# directories to ignore when looking for source files.
77exclude_patterns = [78'_build',79'_themes/*.rst', # Excluded due to README.rst in _themes/80]
81
82# The reST default role (used for this markup: `text`) to use for all documents.
83#default_role = None
84
85# If true, '()' will be appended to :func: etc. cross-reference text.
86#add_function_parentheses = True
87
88# If true, the current module name will be prepended to all description
89# unit titles (such as .. function::).
90#add_module_names = True
91
92# If true, sectionauthor and moduleauthor directives will be shown in the
93# output. They are ignored by default.
94#show_authors = False
95
96# The name of the Pygments (syntax highlighting) style to use.
97pygments_style = 'flask_theme_support.FlaskyStyle'98
99# A list of ignored prefixes for module index sorting.
100#modindex_common_prefix = []
101
102
103# -- Options for HTML output ---------------------------------------------------
104
105# The theme to use for HTML and HTML Help pages. See the documentation for
106# a list of builtin themes.
107html_theme = 'alabaster'108
109# Theme options are theme-specific and customize the look and feel of a theme
110# further. For a list of options available for each theme, see the
111# documentation.
112html_theme_options = {113'show_powered_by': False,114'github_user': 'realpython',115'github_repo': 'python-guide',116'github_banner': True,117'show_related': False,118'note_bg': '#FFF59C',119}
120
121# Add any paths that contain custom themes here, relative to this directory.
122html_theme_path = ['_themes']123
124# The name for this set of Sphinx documents. If None, it defaults to
125# "<project> v<release> documentation".
126html_title = 'The Hitchhiker\'s Guide to Python'127
128# A shorter title for the navigation bar. Default is the same as html_title.
129#html_short_title = None
130
131# The name of an image file (relative to this directory) to place at the top
132# of the sidebar.
133#html_logo = None
134
135# The name of an image file (within the static path) to use as favicon of the
136# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
137# pixels large.
138#html_favicon = None
139
140# Add any paths that contain custom static files (such as style sheets) here,
141# relative to this directory. They are copied after the builtin static files,
142# so a file named "default.css" will overwrite the builtin "default.css".
143html_static_path = ['_static']144
145# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
146# using the given strftime format.
147#html_last_updated_fmt = '%b %d, %Y'
148
149# If true, SmartyPants will be used to convert quotes and dashes to
150# typographically correct entities.
151#html_use_smartypants = True
152
153# Custom sidebar templates, maps document names to template names.
154html_sidebars = {155'index': ['sidebarintro.html', 'sourcelink.html', 'searchbox.html', 'hacks.html'],156'**': ['sidebarlogo.html', 'localtoc.html', 'relations.html',157'sourcelink.html', 'searchbox.html', 'hacks.html']158}
159
160# Additional templates that should be rendered to pages, maps page names to
161# template names.
162#html_additional_pages = {}
163
164# If false, no module index is generated.
165#html_domain_indices = True
166
167# If false, no index is generated.
168#html_use_index = True
169
170# If true, the index is split into individual pages for each letter.
171#html_split_index = False
172
173# If true, links to the reST sources are added to the pages.
174html_show_sourcelink = False175
176# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
177html_show_sphinx = False178
179# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
180#html_show_copyright = True
181
182# If true, an OpenSearch description file will be output, and all pages will
183# contain a <link> tag referring to it. The value of this option must be the
184# base URL from which the finished HTML is served.
185#html_use_opensearch = ''
186
187# This is the file name suffix for HTML files (e.g. ".xhtml").
188#html_file_suffix = None
189
190# Output file base name for HTML help builder.
191htmlhelp_basename = 'pythonguidedoc'192
193
194# -- Options for LaTeX output --------------------------------------------------
195
196# The paper size ('letter' or 'a4').
197#latex_paper_size = 'letter'
198
199# The font size ('10pt', '11pt' or '12pt').
200#latex_font_size = '10pt'
201
202# Grouping the document tree into LaTeX files. List of tuples
203# (source start file, target name, title, author, documentclass [howto/manual]).
204latex_documents = [205('index', 'pythonguide.tex', u'Python Guide Documentation',206u'Kenneth Reitz', 'manual'),207]
208
209# The name of an image file (relative to this directory) to place at the top of
210# the title page.
211#latex_logo = None
212
213# For "manual" documents, if this is true, then toplevel headings are parts,
214# not chapters.
215#latex_use_parts = False
216
217# If true, show page references after internal links.
218#latex_show_pagerefs = False
219
220# If true, show URL addresses after external links.
221#latex_show_urls = False
222
223# Additional stuff for the LaTeX preamble.
224#latex_preamble = ''
225
226# Documents to append as an appendix to all manuals.
227#latex_appendices = []
228
229# If false, no module index is generated.
230#latex_domain_indices = True
231
232
233# -- Options for manual page output --------------------------------------------
234
235# One entry per manual page. List of tuples
236# (source start file, name, description, authors, manual section).
237man_pages = [238('index', 'pythonguide', u'Python Guide Documentation',239[u'Kenneth Reitz'], 1)240]
241
242
243# -- Options for Epub output ---------------------------------------------------
244
245# Bibliographic Dublin Core info.
246epub_title = u'pythonguide'247epub_author = u'Kenneth Reitz'248epub_publisher = u'Kenneth Reitz'249epub_copyright = u'2011–{}, Kenneth Reitz & Real Python'.format(current_year)250
251# The language of the text. It defaults to the language option
252# or en if the language is not set.
253#epub_language = ''
254
255# The scheme of the identifier. Typical schemes are ISBN or URL.
256#epub_scheme = ''
257
258# The unique identifier of the text. This can be a ISBN number
259# or the project homepage.
260#epub_identifier = ''
261
262# A unique identification for the text.
263#epub_uid = ''
264
265# HTML files that should be inserted before the pages created by sphinx.
266# The format is a list of tuples containing the path and title.
267#epub_pre_files = []
268
269# HTML files that should be inserted after the pages created by sphinx.
270# The format is a list of tuples containing the path and title.
271#epub_post_files = []
272
273# A list of files that should not be packed into the epub file.
274epub_exclude_files = [275('search.html', 'Search'),276]
277
278# The depth of the table of contents in toc.ncx.
279#epub_tocdepth = 3
280
281# Allow duplicate toc entries.
282#epub_tocdup = True
283
284todo_include_todos = True285
286intersphinx_mapping = {287'python': ('https://docs.python.org/3', None),288}
289