Debian Codegraph @

docs/conf.py

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 # -*- coding: utf-8 -*-
2 """
3 Sphinx configuration file for the cloud_sptheme documentation.
4
5 This file is execfile()d with the current directory set to its containing dir.
6 Note that not all possible configuration values are present in this
7 autogenerated file. All configuration values have a default; values that are
8 commented out serve to show the default.
9
10 This honors the following sphinx tags (passed via -t or $SPHINX_BUILD_TAGS):
11 * for-pypi -- generate special version to upload to pypi
12 """
13 #=============================================================================
14 # environment setup
15 #=============================================================================
16 import sys, os
17
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.
21 ##sys.path.insert(0, os.path.abspath('.'))
22
23 # make sure root of source dir in sys.path
24 sys.path.insert(0, os.path.abspath(os.pardir))
25
26 # read env var for tags, needed since "python setup.py build_sphinx"
27 # doesn't support sphinx-build's "-t" option.
28 for _tag in os.environ.get("SPHINX_BUILD_TAGS", "").split():
29 tags.add(_tag)
30
31 #=============================================================================
32 # imports
33 #=============================================================================
34 # import cloud_sptheme for themes, etc
35 import cloud_sptheme as csp
36
37 #=============================================================================
38 # General configuration
39 #=============================================================================
40
41 # If your documentation needs a minimal Sphinx version, state it here.
42 needs_sphinx = '1.6'
43
44 # Add any Sphinx extension module names here, as strings. They can be extensions
45 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
46 extensions = [
47 # standard sphinx extensions
48 'sphinx.ext.autodoc',
49 'sphinx.ext.todo',
50
51 # 3rd party extensions
52 'sphinxcontrib.fulltoc',
53 'sphinx.ext.viewcode', # mainly to make sure layout works properly
54
55 # cloud's extensions
56 'cloud_sptheme.ext.autodoc_sections',
57 'cloud_sptheme.ext.relbar_links',
58 'cloud_sptheme.ext.escaped_samp_literals',
59 'cloud_sptheme.ext.issue_tracker',
60 'cloud_sptheme.ext.table_styling',
61 'cloud_sptheme.ext.role_index', # NOTE: used only to provide example role index
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'
72
73 # The master toctree document.
74 master_doc = 'contents'
75
76 # The frontpage document.
77 index_doc = 'index'
78
79 # General information about the project.
80 project = "Cloud Sphinx Theme"
81 author = "Assurance Technologies, LLC"
82 copyright = "2010-2019, " + author
83
84 # The version info for the project you're documenting, acts as replacement for
85 # |version| and |release|, also used in various other places throughout the
86 # built documents.
87
88 # release: The full version, including alpha/beta/rc tags.
89 # version: The short X.Y version.
90 from cloud_sptheme import __version__ as release
91 version = csp.get_version(release)
92
93 # The language for content autogenerated by Sphinx. Refer to documentation
94 # for a list of supported languages.
95 ##language = None
96
97 # There are two options for replacing |today|: either, you set today to some
98 # non-false value, then it is used:
99 ##today = ''
100 # Else, today_fmt is used as the format for a strftime call.
101 ##today_fmt = '%B %d, %Y'
102
103 # List of patterns, relative to source directory, that match files and
104 # directories to ignore when looking for source files.
105 exclude_patterns = [
106 # may revise/remove this
107 "lib/cloud_sptheme.make_helper.rst",
108 ]
109
110 # The reST default role (used for this markup: `text`) to use for all documents.
111 ##default_role = None
112
113 # If true, '()' will be appended to :func: etc. cross-reference text.
114 add_function_parentheses = True
115
116 # If true, the current module name will be prepended to all description
117 # unit titles (such as .. function::).
118 ##add_module_names = True
119
120 # If true, sectionauthor and moduleauthor directives will be shown in the
121 # output. They are ignored by default.
122 ##show_authors = False
123
124 # The name of the Pygments (syntax highlighting) style to use.
125 pygments_style = 'sphinx'
126
127 # A list of ignored prefixes for module index sorting.
128 modindex_common_prefix = [ "cloud_sptheme." ]
129
130 if tags.has("for-pypi"):
131
132 extensions.append('cloud_sptheme.ext.auto_redirect')
133 # auto_redirect_subject = "The official cloud_sptheme documentation"
134 auto_redirect_domain_url = "https://cloud-sptheme.readthedocs.io"
135 auto_redirect_domain_root = "/en/latest"
136
137 #=============================================================================
138 # Options for all output
139 #=============================================================================
140 todo_include_todos = True
141 keep_warnings = True
142 issue_tracker_url = "https://foss.heptapod.net/doc-utils/cloud_sptheme/issues/{issue}"
143
144 # # for testing table_style ext
145 # table_styling_default_align = "left"
146
147 #=============================================================================
148 # Options for HTML output
149 #=============================================================================
150
151 # The theme to use for HTML and HTML Help pages. See the documentation for
152 # a list of builtin themes.
153 html_theme = os.environ.get("SPHINX_THEME") or 'cloud'
154
155 # Theme options are theme-specific and customize the look and feel of a theme
156 # further. For a list of options available for each theme, see the
157 # documentation.
158 html_theme_options = {}
159 if csp.is_cloud_theme(html_theme):
160 html_theme_options.update(
161 roottarget=index_doc,
162 borderless_decor=True,
163 sidebarwidth="3in",
164 hyphenation_language="en",
165 )
166
167 # Add any paths that contain custom themes here, relative to this directory.
168 if csp.is_cloud_theme(html_theme):
169 # so build works even if package isn't installed
170 html_theme_path = [csp._theme_dir]
171
172 # The name for this set of Sphinx documents. If None, it defaults to
173 # "<project> v<release> documentation".
174 html_title = "%s v%s Documentation" % (project, release)
175
176 # A shorter title for the navigation bar. Default is the same as html_title.
177 html_short_title = "%s %s Documentation" % (project, version)
178
179 # The name of an image file (relative to this directory) to place at the top
180 # of the sidebar.
181 html_logo = os.path.join("_static", "masthead.png")
182
183 # The name of an image file (within the static path) to use as favicon of the
184 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
185 # pixels large.
186 ##html_favicon = None
187
188 # Add any paths that contain custom static files (such as style sheets) here,
189 # relative to this directory. They are copied after the builtin static files,
190 # so a file named "default.css" will overwrite the builtin "default.css".
191 html_static_path = ['_static']
192
193 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
194 # using the given strftime format.
195 ##html_last_updated_fmt = '%b %d, %Y'
196
197 # If true, SmartyPants will be used to convert quotes and dashes to
198 # typographically correct entities.
199 html_use_smartypants = True
200
201 # Custom sidebar templates, maps document names to template names.
202 html_sidebars = {'**': ['searchbox.html', 'globaltoc.html']}
203
204 # Additional templates that should be rendered to pages, maps page names to
205 # template names.
206 ##html_additional_pages = {}
207
208 # If false, no module index is generated.
209 ##html_domain_indices = True
210
211 # If false, no index is generated.
212 ##html_use_index = True
213
214 # If true, the index is split into individual pages for each letter.
215 ##html_split_index = False
216
217 # If true, links to the reST sources are added to the pages.
218 ##html_show_sourcelink = True
219
220 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
221 ##html_show_sphinx = True
222
223 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
224 ##html_show_copyright = True
225
226 # If true, an OpenSearch description file will be output, and all pages will
227 # contain a <link> tag referring to it. The value of this option must be the
228 # base URL from which the finished HTML is served.
229 ##html_use_opensearch = ''
230
231 # This is the file name suffix for HTML files (e.g. ".xhtml").
232 ##html_file_suffix = None
233
234 # Output file base name for HTML help builder.
235 htmlhelp_basename = project + 'Doc'
236
237 #=============================================================================
238 # Options for LaTeX output
239 #=============================================================================
240
241 # The paper size ('letter' or 'a4').
242 ##latex_paper_size = 'letter'
243
244 # The font size ('10pt', '11pt' or '12pt').
245 ##latex_font_size = '10pt'
246
247 # Grouping the document tree into LaTeX files. List of tuples
248 # (source start file, target name, title, author, documentclass [howto/manual]).
249 latex_documents = [
250 (index_doc, project + '.tex', project + ' Documentation',
251 author, 'manual'),
252 ]
253
254 # The name of an image file (relative to this directory) to place at the top of
255 # the title page.
256 ##latex_logo = None
257
258 # For "manual" documents, if this is true, then toplevel headings are parts,
259 # not chapters.
260 ##latex_use_parts = False
261
262 # If true, show page references after internal links.
263 ##latex_show_pagerefs = False
264
265 # If true, show URL addresses after external links.
266 ##latex_show_urls = False
267
268 # Additional stuff for the LaTeX preamble.
269 ##latex_preamble = ''
270
271 # Documents to append as an appendix to all manuals.
272 ##latex_appendices = []
273
274 # If false, no module index is generated.
275 ##latex_domain_indices = True
276
277 #=============================================================================
278 # Options for manual page output
279 #=============================================================================
280
281 # One entry per manual page. List of tuples
282 # (source start file, name, description, authors, manual section).
283 man_pages = [
284 (index_doc, project, project + ' Documentation',
285 [author], 1)
286 ]
287
288 #=============================================================================
289 # EOF
290 #=============================================================================