blob: 450396ce0ed1db5378b9a7b014442f5d4b8bcfd9 [file] [log] [blame]
Zack Williams7f708f82020-07-07 12:18:20 -07001# -*- coding: utf-8 -*-
2#
3# Configuration file for the Sphinx documentation builder.
4#
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
8
9# -- Path setup --------------------------------------------------------------
10
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.
14#
15# import os
16# import sys
17# sys.path.insert(0, os.path.abspath('.'))
18
19import os
20
21def get_version():
22 with open("VERSION") as f:
23 return f.read().strip()
24
25# -- Project information -----------------------------------------------------
26
27project = u'Aether Docs'
28copyright = u'2020-current, Open Networking Foundation'
29author = u'Open Networking Foundation'
30
31# The short X.Y version
32version = get_version()
33
34# The full version, including alpha/beta/rc tags
35release = version
36
37# -- General configuration ---------------------------------------------------
38
39# If your documentation needs a minimal Sphinx version, state it here.
40#
41# needs_sphinx = '1.0'
42
43# make all warnings errors
44warning_is_error = True
45
46# Add any Sphinx extension module names here, as strings. They can be
47# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
48# ones.
49extensions = [
50 'sphinx.ext.coverage',
51 'sphinx.ext.graphviz',
52 'sphinx.ext.ifconfig',
53 'sphinx.ext.mathjax',
54 'sphinx.ext.todo',
55 'sphinxcontrib.spelling',
56 "sphinx_multiversion",
57]
58
59# Text files with lists of words that shouldn't fail the spellchecker:
60spelling_word_list_filename=['dict.txt', ]
61
62# sphinx-multiversion prep, run in each versioned source directory
63prep_commands = [
64]
65
66# inlcude only the branches matching master and aether-*
67smv_branch_whitelist = r'^(master|aether-.*)$'
68
69# include all remote branches
70smv_remote_whitelist = r'^.*$'
71
72# Add any paths that contain templates here, relative to this directory.
73templates_path = ['_templates']
74
75# The suffix(es) of source filenames.
76# You can specify multiple suffix as a list of string:
77#
78# source_suffix = ['.rst', '.md']
79source_suffix = ['.rst']
80
81# The master toctree document.
82master_doc = 'index'
83
84# The language for content autogenerated by Sphinx. Refer to documentation
85# for a list of supported languages.
86#
87# This is also used if you do content translation via gettext catalogs.
88# Usually you set "language" from the command line for these cases.
89language = None
90
91# List of patterns, relative to source directory, that match files and
92# directories to ignore when looking for source files.
93# This pattern also affects html_static_path and html_extra_path.
94exclude_patterns = [
95 '*/LICENSE.md',
96 '*/vendor',
97 '.DS_Store',
98 'Thumbs.db',
99 '_build',
100 'venv_docs',
101 'requirements.txt',
102]
103
104# The name of the Pygments (syntax highlighting) style to use.
105pygments_style = None
106
107# -- Options for HTML output -------------------------------------------------
108
109# The theme to use for HTML and HTML Help pages. See the documentation for
110# a list of builtin themes.
111#
112html_theme = 'sphinx_rtd_theme'
113
114html_logo = '_static/aether.svg'
115
116html_favicon = '_static/aether-favicon-128.png'
117
118# Theme options are theme-specific and customize the look and feel of a theme
119# further. For a list of options available for each theme, see the
120# documentation.
121#
122html_theme_options = {
123 'logo_only': True
124}
125
126# Add any paths that contain custom static files (such as style sheets) here,
127# relative to this directory. They are copied after the builtin static files,
128# so a file named "default.css" will overwrite the builtin "default.css".
129html_static_path = ['_static']
130
131# Custom sidebar templates, must be a dictionary that maps document names
132# to template names.
133#
134# The default sidebars (for documents that don't match any pattern) are
135# defined by theme itself. Builtin themes are using these templates by
136# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
137# 'searchbox.html']``.
138#
139# html_sidebars = {}
140
141# -- Options for HTMLHelp output ---------------------------------------------
142
143# Output file base name for HTML help builder.
144htmlhelp_basename = 'AetherDocs'
145
146
147# -- Options for LaTeX output ------------------------------------------------
148
149latex_elements = {
150 # The paper size ('letterpaper' or 'a4paper').
151 #
152 # 'papersize': 'letterpaper',
153
154 # The font size ('10pt', '11pt' or '12pt').
155 #
156 # 'pointsize': '10pt',
157
158 # Additional stuff for the LaTeX preamble.
159 #
160 # 'preamble': '',
161
162 # Latex figure (float) alignment
163 #
164 # 'figure_align': 'htbp',
165}
166
167# Grouping the document tree into LaTeX files. List of tuples
168# (source start file, target name, title,
169# author, documentclass [howto, manual, or own class]).
170latex_documents = [
171 (master_doc, 'AetherDocs.tex', u'Aether Docs',
172 u'ONF', 'manual'),
173]
174
175
176# -- Options for manual page output ------------------------------------------
177
178# One entry per manual page. List of tuples
179# (source start file, name, description, authors, manual section).
180man_pages = [
181 (master_doc, 'Aether Docs', u'Aether Docs',
182 [author], 1)
183]
184
185
186# -- Options for Texinfo output ----------------------------------------------
187
188# Grouping the document tree into Texinfo files. List of tuples
189# (source start file, target name, title, author,
190# dir menu entry, description, category)
191texinfo_documents = [
192 (master_doc, 'Aether Docs', u'Aether Docs',
193 author, 'AetherDocs', 'One line description of project.',
194 'Miscellaneous'),
195]
196
197
198# -- Options for Epub output -------------------------------------------------
199
200# Bibliographic Dublin Core info.
201epub_title = project
202
203# The unique identifier of the text. This can be a ISBN number
204# or the project homepage.
205#
206# epub_identifier = ''
207
208# A unique identification for the text.
209#
210# epub_uid = ''
211
212# A list of files that should not be packed into the epub file.
213epub_exclude_files = ['search.html']
214
215
216# -- Extension configuration -------------------------------------------------
217
218# blockdiag/etc. config
219
220rackdiag_antialias = True
221rackdiag_html_image_format = "SVG"
222rackdiag_fontpath = [
223 "_static/fonts/Inconsolata-Regular.ttf",
224 "_static/fonts/Inconsolata-Bold.ttf",
225]
226
227nwdiag_antialias = True
228nwdiag_html_image_format = "SVG"
229nwdiag_fontpath = [
230 "_static/fonts/Inconsolata-Regular.ttf",
231 "_static/fonts/Inconsolata-Bold.ttf",
232]
233
234# -- Options for todo extension ----------------------------------------------
235# If true, `todo` and `todoList` produce output, else they produce nothing.
236todo_include_todos = True
237
238# -- Options for linkcheck ---------------------------------------------------
239# The link checker strips off .md from links and then complains
240linkcheck_ignore = [
241 r'https://www.sphinx-doc.org',
242]
243
244def setup(app):
245
246 app.add_css_file('css/rtd_theme_mods.css')
247
248 app.add_config_value('recommonmark_config', {
249 'url_resolver': lambda url: github_doc_root + url,
250 'auto_toc_tree_section': 'Contents',
251 }, True)