Debian Codegraph @

docs/conf.py

raw symbols SCIP
1 #
2 # aiohttp_jinja2 documentation build configuration file, created by
3 # sphinx-quickstart on Sun Mar 22 12:04:15 2015.
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
14 import os
15 import re
16 import sys
17
18
19 def _get_version_info():
20 PATH_TO_INIT_PY = os.path.join(
21 os.path.dirname(__file__), "..", "aiohttp_jinja2", "__init__.py"
22 )
23
24 with open(PATH_TO_INIT_PY, encoding="latin1") as fp:
25 try:
26 version = re.search(
27 r'^__version__ = "'
28 r"(?P<major>\d+)"
29 r"\.(?P<minor>\d+)"
30 r"(\.(?P<patch>\d+)"
31 r'(?P<tag>.*)?)?"$',
32 fp.read(),
33 re.M,
34 )
35 return version.groupdict()
36 except IndexError:
37 raise RuntimeError("Unable to determine version.")
38
39
40 _version_info = _get_version_info()
41
42
43 # If extensions (or modules to document with autodoc) are in another directory,
44 # add these directories to sys.path here. If the directory is relative to the
45 # documentation root, use os.path.abspath to make it absolute, like shown here.
46 sys.path.insert(0, os.path.abspath(".."))
47
48 import alabaster
49
50 # -- General configuration ------------------------------------------------
51
52 # If your documentation needs a minimal Sphinx version, state it here.
53 # needs_sphinx = '1.3'
54
55 # Add any Sphinx extension module names here, as strings. They can be
56 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
57 # ones.
58 extensions = [
59 "sphinx.ext.intersphinx",
60 "sphinx.ext.viewcode",
61 "alabaster",
62 ]
63
64 # Add any paths that contain templates here, relative to this directory.
65 templates_path = ["_templates"]
66
67 # The suffix of source filenames.
68 source_suffix = ".rst"
69
70 # The encoding of source files.
71 # source_encoding = 'utf-8-sig'
72
73 # The master toctree document.
74 master_doc = "index"
75
76 # General information about the project.
77 project = "aiohttp_jinja2"
78 copyright = "2015-2021 Andrew Svetlov and aio-libs team"
79
80 # The version info for the project you're documenting, acts as replacement for
81 # |version| and |release|, also used in various other places throughout the
82 # built documents.
83 #
84 # The short X.Y version.
85 version = "{major}.{minor}".format(**_version_info)
86 # The full version, including alpha/beta/rc tags.
87 release = "{major}.{minor}.{patch}-{tag}".format(**_version_info)
88
89 # The language for content autogenerated by Sphinx. Refer to documentation
90 # for a list of supported languages.
91 # language = None
92
93 # There are two options for replacing |today|: either, you set today to some
94 # non-false value, then it is used:
95 # today = ''
96 # Else, today_fmt is used as the format for a strftime call.
97 # today_fmt = '%B %d, %Y'
98
99 # List of patterns, relative to source directory, that match files and
100 # directories to ignore when looking for source files.
101 exclude_patterns = ["_build"]
102
103 # The reST default role (used for this markup: `text`) to use for all
104 # documents.
105 # default_role = None
106
107 # If true, '()' will be appended to :func: etc. cross-reference text.
108 # add_function_parentheses = True
109
110 # If true, the current module name will be prepended to all description
111 # unit titles (such as .. function::).
112 # add_module_names = True
113
114 # If true, sectionauthor and moduleauthor directives will be shown in the
115 # output. They are ignored by default.
116 # show_authors = False
117
118 # The name of the Pygments (syntax highlighting) style to use.
119 pygments_style = "sphinx"
120
121 # A list of ignored prefixes for module index sorting.
122 # modindex_common_prefix = []
123
124 # If true, keep warnings as "system message" paragraphs in the built documents.
125 # keep_warnings = False
126
127
128 # -- Options for HTML output ----------------------------------------------
129
130 # The theme to use for HTML and HTML Help pages. See the documentation for
131 # a list of builtin themes.
132 html_theme = "alabaster"
133
134 # Theme options are theme-specific and customize the look and feel of a theme
135 # further. For a list of options available for each theme, see the
136 # documentation.
137 html_theme_options = {
138 "logo": "aiohttp-icon-128x128.png",
139 "description": "jinja2 template renderer for aiohttp.web",
140 "github_user": "aio-libs",
141 "github_repo": "aiohttp_jinja2",
142 "github_button": True,
143 "github_banner": True,
144 "travis_button": "aio-libs/aiohttp-jinja2",
145 "pre_bg": "#FFF6E5",
146 "note_bg": "#E5ECD1",
147 "note_border": "#BFCF8C",
148 "body_text": "#482C0A",
149 "sidebar_text": "#49443E",
150 "sidebar_header": "#4B4032",
151 }
152
153 # Add any paths that contain custom themes here, relative to this directory.
154 html_theme_path = [alabaster.get_path()]
155
156 # The name for this set of Sphinx documents. If None, it defaults to
157 # "<project> v<release> documentation".
158 # html_title = None
159
160 # A shorter title for the navigation bar. Default is the same as html_title.
161 # html_short_title = None
162
163 # The name of an image file (relative to this directory) to place at the top
164 # of the sidebar.
165 # html_logo = None
166
167 # The name of an image file (within the static path) to use as favicon of the
168 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
169 # pixels large.
170 html_favicon = "aiohttp-icon.ico"
171
172 # Add any paths that contain custom static files (such as style sheets) here,
173 # relative to this directory. They are copied after the builtin static files,
174 # so a file named "default.css" will overwrite the builtin "default.css".
175 html_static_path = ["_static"]
176
177 # Add any extra paths that contain custom files (such as robots.txt or
178 # .htaccess) here, relative to this directory. These files are copied
179 # directly to the root of the documentation.
180 # html_extra_path = []
181
182 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
183 # using the given strftime format.
184 # html_last_updated_fmt = '%b %d, %Y'
185
186 # If true, SmartyPants will be used to convert quotes and dashes to
187 # typographically correct entities.
188 # html_use_smartypants = True
189
190 # Custom sidebar templates, maps document names to template names.
191 html_sidebars = {
192 "**": [
193 "about.html",
194 "navigation.html",
195 "searchbox.html",
196 ]
197 }
198
199 # Additional templates that should be rendered to pages, maps page names to
200 # template names.
201 # html_additional_pages = {}
202
203 # If false, no module index is generated.
204 # html_domain_indices = True
205
206 # If false, no index is generated.
207 # html_use_index = True
208
209 # If true, the index is split into individual pages for each letter.
210 # html_split_index = False
211
212 # If true, links to the reST sources are added to the pages.
213 # html_show_sourcelink = True
214
215 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
216 # html_show_sphinx = True
217
218 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
219 # html_show_copyright = True
220
221 # If true, an OpenSearch description file will be output, and all pages will
222 # contain a <link> tag referring to it. The value of this option must be the
223 # base URL from which the finished HTML is served.
224 # html_use_opensearch = ''
225
226 # This is the file name suffix for HTML files (e.g. ".xhtml").
227 # html_file_suffix = None
228
229 # Output file base name for HTML help builder.
230 htmlhelp_basename = "aiohttp_jinja2doc"
231
232
233 # -- Options for LaTeX output ---------------------------------------------
234
235 # The paper size ('letterpaper' or 'a4paper').
236 # 'papersize': 'letterpaper',
237
238 # The font size ('10pt', '11pt' or '12pt').
239 # 'pointsize': '10pt',
240
241 # Additional stuff for the LaTeX preamble.
242 # 'preamble': '',
243 latex_elements = {}
244
245 # Grouping the document tree into LaTeX files. List of tuples
246 # (source start file, target name, title,
247 # author, documentclass [howto, manual, or own class]).
248 latex_documents = [
249 (
250 "index",
251 "aiohttp_jinja2.tex",
252 "aiohttp\\_jinja2 Documentation",
253 "Andrew Svetlov",
254 "manual",
255 ),
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).
283 man_pages = [
284 ("index", "aiohttp_jinja2", "aiohttp_jinja2 Documentation", ["Andrew Svetlov"], 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)
296 texinfo_documents = [
297 (
298 "index",
299 "aiohttp_jinja2",
300 "aiohttp_jinja2 Documentation",
301 "Andrew Svetlov",
302 "aiohttp_jinja2",
303 "One line description of project.",
304 "Miscellaneous",
305 ),
306 ]
307
308 # Documents to append as an appendix to all manuals.
309 # texinfo_appendices = []
310
311 # If false, no module index is generated.
312 # texinfo_domain_indices = True
313
314 # How to display URL addresses: 'footnote', 'no', or 'inline'.
315 # texinfo_show_urls = 'footnote'
316
317 # If true, do not generate a @detailmenu in the "Top" node's menu.
318 # texinfo_no_detailmenu = False
319
320
321 # Example configuration for intersphinx: refer to the Python standard library.
322 intersphinx_mapping = {
323 "http://docs.python.org/3": None,
324 "https://aiohttp.readthedocs.io/en/stable": None,
325 "https://jinja.palletsprojects.com/en/latest": None,
326 }