blob: b4e403c706ebd80ffa6706fa4f898a596fb35654 [file] [log] [blame]
Zack Williams7f708f82020-07-07 12:18:20 -07001# -*- coding: utf-8 -*-
Zack Williams44faef92022-03-08 22:07:49 -07002
3# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
4# SPDX-License-Identifier: Apache-2.0
5
Zack Williams7f708f82020-07-07 12:18:20 -07006#
7# Configuration file for the Sphinx documentation builder.
8#
9# This file does only contain a selection of the most common options. For a
10# full list see the documentation:
11# http://www.sphinx-doc.org/en/master/config
12
13# -- Path setup --------------------------------------------------------------
14
15# If extensions (or modules to document with autodoc) are in another directory,
16# add these directories to sys.path here. If the directory is relative to the
17# documentation root, use os.path.abspath to make it absolute, like shown here.
18#
19# import os
20# import sys
21# sys.path.insert(0, os.path.abspath('.'))
22
23import os
24
25def get_version():
26 with open("VERSION") as f:
27 return f.read().strip()
28
29# -- Project information -----------------------------------------------------
30
31project = u'Aether Docs'
32copyright = u'2020-current, Open Networking Foundation'
33author = u'Open Networking Foundation'
34
35# The short X.Y version
36version = get_version()
37
38# The full version, including alpha/beta/rc tags
39release = version
40
41# -- General configuration ---------------------------------------------------
42
43# If your documentation needs a minimal Sphinx version, state it here.
44#
45# needs_sphinx = '1.0'
46
47# make all warnings errors
48warning_is_error = True
49
50# Add any Sphinx extension module names here, as strings. They can be
51# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
52# ones.
53extensions = [
Zack Williams1ae109e2021-07-27 11:17:04 -070054 'sphinx.ext.autosectionlabel',
Zack Williams7f708f82020-07-07 12:18:20 -070055 'sphinx.ext.coverage',
56 'sphinx.ext.graphviz',
57 'sphinx.ext.ifconfig',
Zack Williams34c30e52020-11-16 10:55:00 -070058 'sphinx.ext.intersphinx',
Zack Williams7f708f82020-07-07 12:18:20 -070059 'sphinx.ext.mathjax',
60 'sphinx.ext.todo',
61 'sphinxcontrib.spelling',
62 "sphinx_multiversion",
63]
64
Zack Williams1ae109e2021-07-27 11:17:04 -070065# require document prefix on section labels
66autosectionlabel_prefix_document = True
67
Zack Williams7f708f82020-07-07 12:18:20 -070068# Text files with lists of words that shouldn't fail the spellchecker:
69spelling_word_list_filename=['dict.txt', ]
70
71# sphinx-multiversion prep, run in each versioned source directory
72prep_commands = [
73]
74
75# inlcude only the branches matching master and aether-*
76smv_branch_whitelist = r'^(master|aether-.*)$'
77
Zack Williams44faef92022-03-08 22:07:49 -070078# Don't include any tags - smv docs say you can put None here, but that is broken
79# https://github.com/Holzhaus/sphinx-multiversion/issues/47
80smv_tag_whitelist = r'notags'
81
Zack Williams7f708f82020-07-07 12:18:20 -070082# include all remote branches
83smv_remote_whitelist = r'^.*$'
84
85# Add any paths that contain templates here, relative to this directory.
86templates_path = ['_templates']
87
88# The suffix(es) of source filenames.
89# You can specify multiple suffix as a list of string:
90#
91# source_suffix = ['.rst', '.md']
92source_suffix = ['.rst']
93
94# The master toctree document.
95master_doc = 'index'
96
97# The language for content autogenerated by Sphinx. Refer to documentation
98# for a list of supported languages.
99#
100# This is also used if you do content translation via gettext catalogs.
101# Usually you set "language" from the command line for these cases.
102language = None
103
104# List of patterns, relative to source directory, that match files and
105# directories to ignore when looking for source files.
106# This pattern also affects html_static_path and html_extra_path.
107exclude_patterns = [
108 '*/LICENSE.md',
109 '*/vendor',
110 '.DS_Store',
Zack Williams44faef92022-03-08 22:07:49 -0700111 'README',
Zack Williams7f708f82020-07-07 12:18:20 -0700112 'Thumbs.db',
113 '_build',
Zack Williams7f708f82020-07-07 12:18:20 -0700114 'requirements.txt',
Zack Williams44faef92022-03-08 22:07:49 -0700115 'venv-docs',
Zack Williams7f708f82020-07-07 12:18:20 -0700116]
117
118# The name of the Pygments (syntax highlighting) style to use.
119pygments_style = None
120
121# -- Options for HTML output -------------------------------------------------
122
123# The theme to use for HTML and HTML Help pages. See the documentation for
124# a list of builtin themes.
125#
126html_theme = 'sphinx_rtd_theme'
127
128html_logo = '_static/aether.svg'
129
130html_favicon = '_static/aether-favicon-128.png'
131
132# Theme options are theme-specific and customize the look and feel of a theme
133# further. For a list of options available for each theme, see the
134# documentation.
135#
136html_theme_options = {
137 'logo_only': True
138}
139
140# Add any paths that contain custom static files (such as style sheets) here,
141# relative to this directory. They are copied after the builtin static files,
142# so a file named "default.css" will overwrite the builtin "default.css".
143html_static_path = ['_static']
144
145# Custom sidebar templates, must be a dictionary that maps document names
146# to template names.
147#
148# The default sidebars (for documents that don't match any pattern) are
149# defined by theme itself. Builtin themes are using these templates by
150# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
151# 'searchbox.html']``.
152#
153# html_sidebars = {}
154
155# -- Options for HTMLHelp output ---------------------------------------------
156
157# Output file base name for HTML help builder.
158htmlhelp_basename = 'AetherDocs'
159
160
161# -- Options for LaTeX output ------------------------------------------------
162
163latex_elements = {
164 # The paper size ('letterpaper' or 'a4paper').
165 #
166 # 'papersize': 'letterpaper',
167
168 # The font size ('10pt', '11pt' or '12pt').
169 #
170 # 'pointsize': '10pt',
171
172 # Additional stuff for the LaTeX preamble.
173 #
174 # 'preamble': '',
175
176 # Latex figure (float) alignment
177 #
178 # 'figure_align': 'htbp',
179}
180
181# Grouping the document tree into LaTeX files. List of tuples
182# (source start file, target name, title,
183# author, documentclass [howto, manual, or own class]).
184latex_documents = [
185 (master_doc, 'AetherDocs.tex', u'Aether Docs',
186 u'ONF', 'manual'),
187]
188
189
190# -- Options for manual page output ------------------------------------------
191
192# One entry per manual page. List of tuples
193# (source start file, name, description, authors, manual section).
194man_pages = [
195 (master_doc, 'Aether Docs', u'Aether Docs',
196 [author], 1)
197]
198
199
200# -- Options for Texinfo output ----------------------------------------------
201
202# Grouping the document tree into Texinfo files. List of tuples
203# (source start file, target name, title, author,
204# dir menu entry, description, category)
205texinfo_documents = [
206 (master_doc, 'Aether Docs', u'Aether Docs',
207 author, 'AetherDocs', 'One line description of project.',
208 'Miscellaneous'),
209]
210
211
212# -- Options for Epub output -------------------------------------------------
213
214# Bibliographic Dublin Core info.
215epub_title = project
216
217# The unique identifier of the text. This can be a ISBN number
218# or the project homepage.
219#
220# epub_identifier = ''
221
222# A unique identification for the text.
223#
224# epub_uid = ''
225
226# A list of files that should not be packed into the epub file.
227epub_exclude_files = ['search.html']
228
229
230# -- Extension configuration -------------------------------------------------
231
232# blockdiag/etc. config
233
234rackdiag_antialias = True
235rackdiag_html_image_format = "SVG"
236rackdiag_fontpath = [
237 "_static/fonts/Inconsolata-Regular.ttf",
238 "_static/fonts/Inconsolata-Bold.ttf",
239]
240
241nwdiag_antialias = True
242nwdiag_html_image_format = "SVG"
243nwdiag_fontpath = [
244 "_static/fonts/Inconsolata-Regular.ttf",
245 "_static/fonts/Inconsolata-Bold.ttf",
246]
247
248# -- Options for todo extension ----------------------------------------------
249# If true, `todo` and `todoList` produce output, else they produce nothing.
250todo_include_todos = True
251
252# -- Options for linkcheck ---------------------------------------------------
253# The link checker strips off .md from links and then complains
254linkcheck_ignore = [
Zack Williams9e6c2722021-09-20 16:38:32 -0700255 r'https://jenkins\.opencord\.org/job/aether-member-only-jobs/.*',
Wei-Yu Chen91d90de2021-10-18 22:06:12 +0800256 r'https://jenkins.aetherproject.org/.*',
257 r'https://gerrit.opencord.org/.*',
258 r'https://sas.goog/.*',
Scott Bakerdb4527e2021-11-03 16:34:40 -0700259 r'https://www.fs.com/.*',
Scott Baker8ca82322022-01-26 09:19:31 -0800260 r'https://velero.io/.*',
Hyunsun Moond1e87332022-02-18 15:07:20 -0800261 r'https://cloud.google.com/.*',
Zack Williams7f708f82020-07-07 12:18:20 -0700262]
263
Zack Williams1ae109e2021-07-27 11:17:04 -0700264linkcheck_timeout = 3
265linkcheck_retries = 2
266
Zack Williams34c30e52020-11-16 10:55:00 -0700267# -- options for Intersphinx extension ---------------------------------------
268
269intersphinx_mapping = {
Zack Williams9026f532020-11-30 11:34:32 -0700270 'ansible': ('https://docs.ansible.com/ansible/latest', None),
Zack Williams34c30e52020-11-16 10:55:00 -0700271 'sphinx': ('https://www.sphinx-doc.org/en/master', None),
272 'trellis': ('https://docs.trellisfabric.org/master', None),
Zack Williams44faef92022-03-08 22:07:49 -0700273 'sdcore': ('https://docs.sd-core.opennetworking.org/master', None),
274 'sdran': ('https://docs.sd-ran.org/master', None),
275 'sdfabric': ('https://docs.sd-fabric.org/master', None),
Zack Williams1ae109e2021-07-27 11:17:04 -0700276 'sysapproach5g': ('https://5g.systemsapproach.org/', None),
277 'sysapproachnet': ('https://book.systemsapproach.org/', None),
278 'sysapproachsdn': ('https://sdn.systemsapproach.org/', None),
Charles Chan770bb612022-03-02 12:34:04 -0800279 'sdfabric': ('https://docs.sd-fabric.org/master', None),
Zack Williams34c30e52020-11-16 10:55:00 -0700280 }
281
Zack Williams7f708f82020-07-07 12:18:20 -0700282def setup(app):
283
284 app.add_css_file('css/rtd_theme_mods.css')