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