Merge branch 'compress' into 'master'
[mailman-web.git] / docs / conf.py
blobb2e121cf93a399f660cb50031b6fe53473a678f3
1 # -*- coding: utf-8 -*-
3 # Configuration file for the Sphinx documentation builder.
5 # This file does only contain a selection of the most common options. For a
6 # full list see the documentation:
7 # http://www.sphinx-doc.org/en/master/config
9 # -- Path setup --------------------------------------------------------------
11 # If extensions (or modules to document with autodoc) are in another directory,
12 # add these directories to sys.path here. If the directory is relative to the
13 # documentation root, use os.path.abspath to make it absolute, like shown here.
15 import os
16 import sys
17 import pprint
19 sys.path.insert(0, os.path.abspath('..'))
21 # -- Project information -----------------------------------------------------
23 project = 'Mailman Web'
24 copyright = '2021, Mailman Developers'
25 author = 'Mailman Developers'
27 # The short X.Y version
28 version = ''
29 # The full version, including alpha/beta/rc tags
30 release = ''
33 # -- General configuration ---------------------------------------------------
35 # If your documentation needs a minimal Sphinx version, state it here.
37 # needs_sphinx = '1.0'
39 # Add any Sphinx extension module names here, as strings. They can be
40 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
41 # ones.
42 extensions = [
43 'sphinx.ext.autodoc',
44 'sphinx.ext.doctest',
45 'sphinx.ext.intersphinx',
46 'sphinx.ext.todo',
47 'sphinx.ext.coverage',
48 'sphinx.ext.ifconfig',
49 'sphinx.ext.viewcode',
52 # Add any paths that contain templates here, relative to this directory.
53 templates_path = ['_templates']
55 # The suffix(es) of source filenames.
56 # You can specify multiple suffix as a list of string:
58 # source_suffix = ['.rst', '.md']
59 source_suffix = '.rst'
61 # The master toctree document.
62 master_doc = 'index'
64 # The language for content autogenerated by Sphinx. Refer to documentation
65 # for a list of supported languages.
67 # This is also used if you do content translation via gettext catalogs.
68 # Usually you set "language" from the command line for these cases.
69 language = 'en'
71 # List of patterns, relative to source directory, that match files and
72 # directories to ignore when looking for source files.
73 # This pattern also affects html_static_path and html_extra_path.
74 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
76 # The name of the Pygments (syntax highlighting) style to use.
77 pygments_style = None
80 # -- Options for HTML output -------------------------------------------------
82 # The theme to use for HTML and HTML Help pages. See the documentation for
83 # a list of builtin themes.
85 html_theme = 'sphinx_rtd_theme'
87 # Theme options are theme-specific and customize the look and feel of a theme
88 # further. For a list of options available for each theme, see the
89 # documentation.
91 # html_theme_options = {}
93 # Add any paths that contain custom themes here, relative to this directory.
94 # html_theme_path = []
96 # The name for this set of Sphinx documents. If None, it defaults to
97 # "<project> v<release> documentation".
98 # html_title = None
100 # A shorter title for the navigation bar. Default is the same as html_title.
101 # html_short_title = None
103 # The name of an image file (relative to this directory) to place at the top
104 # of the sidebar.
105 html_logo = '../logo2010-2.jpg'
107 # The name of an image file (within the static path) to use as favicon of the
108 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
109 # pixels large.
110 # html_favicon = None
112 # Add any paths that contain custom static files (such as style sheets) here,
113 # relative to this directory. They are copied after the builtin static files,
114 # so a file named "default.css" will overwrite the builtin "default.css".
115 html_static_path = ['_static']
117 # Custom sidebar templates, must be a dictionary that maps document names
118 # to template names.
120 # The default sidebars (for documents that don't match any pattern) are
121 # defined by theme itself. Builtin themes are using these templates by
122 # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
123 # 'searchbox.html']``.
125 html_sidebars = {}
128 # -- Options for HTMLHelp output ---------------------------------------------
130 # Output file base name for HTML help builder.
131 htmlhelp_basename = 'MailmanWebdoc'
134 # -- Options for LaTeX output ------------------------------------------------
136 latex_elements = {
137 # The paper size ('letterpaper' or 'a4paper').
139 # 'papersize': 'letterpaper',
141 # The font size ('10pt', '11pt' or '12pt').
143 # 'pointsize': '10pt',
145 # Additional stuff for the LaTeX preamble.
147 # 'preamble': '',
149 # Latex figure (float) alignment
151 # 'figure_align': 'htbp',
154 # Grouping the document tree into LaTeX files. List of tuples
155 # (source start file, target name, title,
156 # author, documentclass [howto, manual, or own class]).
157 latex_documents = [
158 (master_doc, 'MailmanWeb.tex', 'Mailman Web Documentation',
159 'Mailman Developers', 'manual'),
163 # -- Options for manual page output ------------------------------------------
165 # One entry per manual page. List of tuples
166 # (source start file, name, description, authors, manual section).
167 man_pages = [
168 (master_doc, 'mailmanweb', 'Mailman Web Documentation',
169 [author], 1)
173 # -- Options for Texinfo output ----------------------------------------------
175 # Grouping the document tree into Texinfo files. List of tuples
176 # (source start file, target name, title, author,
177 # dir menu entry, description, category)
178 texinfo_documents = [
179 (master_doc, 'MailmanWeb', 'Mailman Web Documentation',
180 author, 'MailmanWeb', 'One line description of project.',
181 'Miscellaneous'),
185 # -- Options for Epub output -------------------------------------------------
187 # Bibliographic Dublin Core info.
188 epub_title = project
190 # The unique identifier of the text. This can be a ISBN number
191 # or the project homepage.
193 # epub_identifier = ''
195 # A unique identification for the text.
197 # epub_uid = ''
199 # A list of files that should not be packed into the epub file.
200 epub_exclude_files = ['search.html']
203 # -- Extension configuration -------------------------------------------------
205 # -- Options for intersphinx extension ---------------------------------------
207 # Example configuration for intersphinx: refer to the Python standard library.
208 intersphinx_mapping = {
209 'python': ('https://docs.python.org/3', None),
212 # -- Options for todo extension ----------------------------------------------
214 # If true, `todo` and `todoList` produce output, else they produce nothing.
215 todo_include_todos = True
217 add_module_names = False
220 # -- Modify the docstring
221 def process_docstring(app, what, name, obj, options, lines):
222 if what not in ('module'):
223 pp = pprint.PrettyPrinter()
224 lines.extend("""Default Value::
228 """.format(pp.pformat(obj)).splitlines())
229 return
232 def setup(app):
233 app.connect('autodoc-process-docstring', process_docstring)