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