Debian Codegraph @

docs/conf.py

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