]> git.proxmox.com Git - proxmox-backup.git/blob - docs/conf.py
PVE integration: Add note about hiding password
[proxmox-backup.git] / docs / conf.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 #
4 # Proxmox Backup documentation build configuration file, originally
5 # created by sphinx-quickstart on Tue Feb 26 16:54:35 2019.
6 #
7 # This file is execfile()d with the current directory set to its
8 # containing dir.
9 #
10 # Note that not all possible configuration values are present in this
11 # autogenerated file.
12 #
13 # All configuration values have a default; values that are commented out
14 # serve to show the default.
15
16 # If extensions (or modules to document with autodoc) are in another directory,
17 # add these directories to sys.path here. If the directory is relative to the
18 # documentation root, use os.path.abspath to make it absolute, like shown here.
19 #
20 import os
21 import sys
22 # sys.path.insert(0, os.path.abspath('.'))
23
24 # custom extensions
25 sys.path.append(os.path.abspath("./_ext"))
26
27 # -- Implement custom formatter for code-blocks ---------------------------
28 #
29 # * use smaller font
30 # * avoid space between lines to nicely format utf8 tables
31
32 from sphinx.highlighting import PygmentsBridge
33 from pygments.formatters.latex import LatexFormatter
34
35 class CustomLatexFormatter(LatexFormatter):
36 def __init__(self, **options):
37 super(CustomLatexFormatter, self).__init__(**options)
38 self.verboptions = r"formatcom=\footnotesize\relax\let\strut\empty"
39
40 PygmentsBridge.latex_formatter = CustomLatexFormatter
41
42 # -- General configuration ------------------------------------------------
43
44 # If your documentation needs a minimal Sphinx version, state it here.
45 #
46 # needs_sphinx = '1.0'
47
48 # Add any Sphinx extension module names here, as strings. They can be
49 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
50 # ones.
51
52 extensions = ["sphinx.ext.graphviz", "sphinx.ext.todo", "proxmox-scanrefs"]
53
54 todo_link_only = True
55
56 # Add any paths that contain templates here, relative to this directory.
57 templates_path = ['_templates']
58
59 # The suffix(es) of source filenames.
60 # You can specify multiple suffix as a list of string:
61 #
62 # source_suffix = ['.rst', '.md']
63 source_suffix = '.rst'
64
65 # The encoding of source files.
66 #
67 # source_encoding = 'utf-8-sig'
68
69 # The master toctree document.
70 master_doc = 'index'
71
72 epilog_file = open('epilog.rst', 'r')
73 rst_epilog = epilog_file.read()
74
75 # General information about the project.
76 project = 'Proxmox Backup'
77 copyright = '2019-2020, Proxmox Support Team'
78 author = 'Proxmox Support 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 vstr = lambda s: '<devbuild>' if s is None else str(s)
86
87 version = vstr(os.getenv('DEB_VERSION_UPSTREAM'))
88 # The full version, including alpha/beta/rc tags.
89 release = vstr(os.getenv('DEB_VERSION'))
90
91 # The language for content autogenerated by Sphinx. Refer to documentation
92 # for a list of supported languages.
93 #
94 # This is also used if you do content translation via gettext catalogs.
95 # Usually you set "language" from the command line for these cases.
96 language = None
97
98 # There are two options for replacing |today|: either, you set today to some
99 # non-false value, then it is used:
100 #
101 # today = ''
102 #
103 # Else, today_fmt is used as the format for a strftime call.
104 #
105 # today_fmt = '%B %d, %Y'
106
107 # List of patterns, relative to source directory, that match files and
108 # directories to ignore when looking for source files.
109 # This patterns also effect to html_static_path and html_extra_path
110 exclude_patterns = [
111 '_build', 'Thumbs.db', '.DS_Store',
112 'proxmox-backup-client/man1.rst',
113 'proxmox-backup-manager/man1.rst',
114 'proxmox-backup-proxy/man1.rst',
115 'pxar/man1.rst',
116 'epilog.rst',
117 'pbs-copyright.rst',
118 'local-zfs.rst'
119 'package-repositories.rst',
120 ]
121
122 # The reST default role (used for this markup: `text`) to use for all
123 # documents.
124 #
125 # default_role = None
126
127 # If true, '()' will be appended to :func: etc. cross-reference text.
128 #
129 # add_function_parentheses = True
130
131 # If true, the current module name will be prepended to all description
132 # unit titles (such as .. function::).
133 #
134 # add_module_names = True
135
136 # If true, sectionauthor and moduleauthor directives will be shown in the
137 # output. They are ignored by default.
138 #
139 # show_authors = False
140
141 # The name of the Pygments (syntax highlighting) style to use.
142 pygments_style = 'sphinx'
143
144 # A list of ignored prefixes for module index sorting.
145 # modindex_common_prefix = []
146
147 # If true, keep warnings as "system message" paragraphs in the built documents.
148 # keep_warnings = False
149
150 # If true, `todo` and `todoList` produce output, else they produce nothing.
151 todo_include_todos = True
152
153
154 # -- Options for HTML output ----------------------------------------------
155
156 # The theme to use for HTML and HTML Help pages. See the documentation for
157 # a list of builtin themes.
158 #
159 html_theme = 'sphinxdoc'
160
161 # Theme options are theme-specific and customize the look and feel of a theme
162 # further. For a list of options available for each theme, see the
163 # documentation.
164 #
165 # html_theme_options = {}
166
167 # Add any paths that contain custom themes here, relative to this directory.
168 # html_theme_path = []
169
170 # The name for this set of Sphinx documents.
171 # "<project> v<release> documentation" by default.
172 #
173 # html_title = 'Proxmox Backup v1.0-1'
174
175 # A shorter title for the navigation bar. Default is the same as html_title.
176 #
177 # html_short_title = None
178
179 # The name of an image file (relative to this directory) to place at the top
180 # of the sidebar.
181 #
182 html_logo = 'images/proxmox-logo.svg'
183
184 # The name of an image file (relative to this directory) to use as a favicon of
185 # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
186 # pixels large.
187 #
188 html_favicon = 'images/favicon.ico'
189
190 # Add any paths that contain custom static files (such as style sheets) here,
191 # relative to this directory. They are copied after the builtin static files,
192 # so a file named "default.css" will overwrite the builtin "default.css".
193 html_static_path = ['_static']
194
195 # Add any extra paths that contain custom files (such as robots.txt or
196 # .htaccess) here, relative to this directory. These files are copied
197 # directly to the root of the documentation.
198 #
199 # html_extra_path = []
200
201 # If not None, a 'Last updated on:' timestamp is inserted at every page
202 # bottom, using the given strftime format.
203 # The empty string is equivalent to '%b %d, %Y'.
204 #
205 # html_last_updated_fmt = None
206
207 # If true, SmartyPants will be used to convert quotes and dashes to
208 # typographically correct entities.
209 #
210 # html_use_smartypants = True
211
212 # Custom sidebar templates, maps document names to template names.
213 #
214 # html_sidebars = {}
215
216 # Additional templates that should be rendered to pages, maps page names to
217 # template names.
218 #
219 # html_additional_pages = {}
220
221 # If false, no module index is generated.
222 #
223 # html_domain_indices = True
224
225 # If false, no index is generated.
226 #
227 # html_use_index = True
228
229 # If true, the index is split into individual pages for each letter.
230 #
231 # html_split_index = False
232
233 # If true, links to the reST sources are added to the pages.
234 #
235 # html_show_sourcelink = True
236
237 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
238 #
239 # html_show_sphinx = True
240
241 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
242 #
243 # html_show_copyright = True
244
245 # If true, an OpenSearch description file will be output, and all pages will
246 # contain a <link> tag referring to it. The value of this option must be the
247 # base URL from which the finished HTML is served.
248 #
249 # html_use_opensearch = ''
250
251 # This is the file name suffix for HTML files (e.g. ".xhtml").
252 # html_file_suffix = None
253
254 # Language to be used for generating the HTML full-text search index.
255 # Sphinx supports the following languages:
256 # 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
257 # 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
258 #
259 # html_search_language = 'en'
260
261 # A dictionary with options for the search language support, empty by default.
262 # 'ja' uses this config value.
263 # 'zh' user can custom change `jieba` dictionary path.
264 #
265 # html_search_options = {'type': 'default'}
266
267 # The name of a javascript file (relative to the configuration directory) that
268 # implements a search results scorer. If empty, the default will be used.
269 #
270 # html_search_scorer = 'scorer.js'
271
272 # Output file base name for HTML help builder.
273 htmlhelp_basename = 'ProxmoxBackupdoc'
274
275 # -- Options for LaTeX output ---------------------------------------------
276
277 latex_engine = 'xelatex'
278
279 latex_elements = {
280 'fontenc': '\\usepackage{fontspec}',
281
282 # The paper size ('letterpaper' or 'a4paper').
283 #
284 'papersize': 'a4paper',
285
286 # The font size ('10pt', '11pt' or '12pt').
287 #
288 'pointsize': '10pt',
289
290 'fontpkg': r'''
291 \setmainfont{Open Sans}
292 \setsansfont{Lato}
293 \setmonofont{DejaVu Sans Mono}
294 ''',
295
296 # Additional stuff for the LaTeX preamble.
297 #
298 # 'preamble': '',
299
300 # Latex figure (float) alignment
301 #
302 # 'figure_align': 'htbp',
303 }
304
305 # Grouping the document tree into LaTeX files. List of tuples
306 # (source start file, target name, title,
307 # author, documentclass [howto, manual, or own class]).
308 latex_documents = [
309 (master_doc, 'ProxmoxBackup.tex', 'Proxmox Backup Documentation',
310 'Proxmox Support Team', 'manual'),
311 ]
312
313 # The name of an image file (relative to this directory) to place at the top of
314 # the title page.
315 #
316 #
317 # Note: newer sphinx 1.6 should be able to convert .svg to .png
318 # automatically using sphinx.ext.imgconverter
319 latex_logo = "images/proxmox-logo.png"
320
321 # For "manual" documents, if this is true, then toplevel headings are parts,
322 # not chapters.
323 #
324 # latex_use_parts = False
325
326 # If true, show page references after internal links.
327 #
328 # latex_show_pagerefs = False
329
330 # If true, show URL addresses after external links.
331 #
332 # latex_show_urls = False
333
334 # Documents to append as an appendix to all manuals.
335 #
336 # latex_appendices = []
337
338 # It false, will not define \strong, \code, itleref, \crossref ... but only
339 # \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
340 # packages.
341 #
342 # latex_keep_old_macro_names = True
343
344 # If false, no module index is generated.
345 #
346 # latex_domain_indices = True
347
348
349 # -- Options for Epub output ----------------------------------------------
350
351 # Bibliographic Dublin Core info.
352 epub_title = project
353 epub_author = author
354 epub_publisher = author
355 epub_copyright = copyright
356
357 # The basename for the epub file. It defaults to the project name.
358 # epub_basename = project
359
360 # The HTML theme for the epub output. Since the default themes are not
361 # optimized for small screen space, using the same theme for HTML and epub
362 # output is usually not wise. This defaults to 'epub', a theme designed to save
363 # visual space.
364 #
365 # epub_theme = 'epub'
366
367 # The language of the text. It defaults to the language option
368 # or 'en' if the language is not set.
369 #
370 # epub_language = ''
371
372 # The scheme of the identifier. Typical schemes are ISBN or URL.
373 # epub_scheme = ''
374
375 # The unique identifier of the text. This can be a ISBN number
376 # or the project homepage.
377 #
378 # epub_identifier = ''
379
380 # A unique identification for the text.
381 #
382 # epub_uid = ''
383
384 # A tuple containing the cover image and cover page html template filenames.
385 #
386 # epub_cover = ()
387
388 # A sequence of (type, uri, title) tuples for the guide element of content.opf.
389 #
390 # epub_guide = ()
391
392 # HTML files that should be inserted before the pages created by sphinx.
393 # The format is a list of tuples containing the path and title.
394 #
395 # epub_pre_files = []
396
397 # HTML files that should be inserted after the pages created by sphinx.
398 # The format is a list of tuples containing the path and title.
399 #
400 # epub_post_files = []
401
402 # A list of files that should not be packed into the epub file.
403 epub_exclude_files = ['search.html']
404
405 # The depth of the table of contents in toc.ncx.
406 #
407 # epub_tocdepth = 3
408
409 # Allow duplicate toc entries.
410 #
411 # epub_tocdup = True
412
413 # Choose between 'default' and 'includehidden'.
414 #
415 # epub_tocscope = 'default'
416
417 # Fix unsupported image types using the Pillow.
418 #
419 # epub_fix_images = False
420
421 # Scale large images.
422 #
423 # epub_max_image_width = 0
424
425 # How to display URL addresses: 'footnote', 'no', or 'inline'.
426 #
427 # epub_show_urls = 'inline'
428
429 # If false, no index is generated.
430 #
431 # epub_use_index = True