blob: 691d8fa11ec2c9ac32a2dd8762134107d32370d6 [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
llpb3534642023-08-02 09:23:52 -0700118# Enable numbered figures
119numfig = True
120numfig_format = {
121 'figure': 'Figure %s.',
122 'table': 'Table %s.'
123 }
124
Zack Williams7f708f82020-07-07 12:18:20 -0700125# The name of the Pygments (syntax highlighting) style to use.
126pygments_style = None
127
128# -- Options for HTML output -------------------------------------------------
129
130# The theme to use for HTML and HTML Help pages. See the documentation for
131# a list of builtin themes.
132#
133html_theme = 'sphinx_rtd_theme'
134
135html_logo = '_static/aether.svg'
136
137html_favicon = '_static/aether-favicon-128.png'
138
139# Theme options are theme-specific and customize the look and feel of a theme
140# further. For a list of options available for each theme, see the
141# documentation.
142#
143html_theme_options = {
144 'logo_only': True
145}
146
147# Add any paths that contain custom static files (such as style sheets) here,
148# relative to this directory. They are copied after the builtin static files,
149# so a file named "default.css" will overwrite the builtin "default.css".
150html_static_path = ['_static']
151
152# Custom sidebar templates, must be a dictionary that maps document names
153# to template names.
154#
155# The default sidebars (for documents that don't match any pattern) are
156# defined by theme itself. Builtin themes are using these templates by
157# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
158# 'searchbox.html']``.
159#
160# html_sidebars = {}
161
162# -- Options for HTMLHelp output ---------------------------------------------
163
164# Output file base name for HTML help builder.
165htmlhelp_basename = 'AetherDocs'
166
167
168# -- Options for LaTeX output ------------------------------------------------
169
170latex_elements = {
171 # The paper size ('letterpaper' or 'a4paper').
172 #
173 # 'papersize': 'letterpaper',
174
175 # The font size ('10pt', '11pt' or '12pt').
176 #
177 # 'pointsize': '10pt',
178
179 # Additional stuff for the LaTeX preamble.
180 #
181 # 'preamble': '',
182
183 # Latex figure (float) alignment
184 #
185 # 'figure_align': 'htbp',
186}
187
188# Grouping the document tree into LaTeX files. List of tuples
189# (source start file, target name, title,
190# author, documentclass [howto, manual, or own class]).
191latex_documents = [
192 (master_doc, 'AetherDocs.tex', u'Aether Docs',
193 u'ONF', 'manual'),
194]
195
196
197# -- Options for manual page output ------------------------------------------
198
199# One entry per manual page. List of tuples
200# (source start file, name, description, authors, manual section).
201man_pages = [
202 (master_doc, 'Aether Docs', u'Aether Docs',
203 [author], 1)
204]
205
206
207# -- Options for Texinfo output ----------------------------------------------
208
209# Grouping the document tree into Texinfo files. List of tuples
210# (source start file, target name, title, author,
211# dir menu entry, description, category)
212texinfo_documents = [
213 (master_doc, 'Aether Docs', u'Aether Docs',
214 author, 'AetherDocs', 'One line description of project.',
215 'Miscellaneous'),
216]
217
218
219# -- Options for Epub output -------------------------------------------------
220
221# Bibliographic Dublin Core info.
222epub_title = project
223
224# The unique identifier of the text. This can be a ISBN number
225# or the project homepage.
226#
227# epub_identifier = ''
228
229# A unique identification for the text.
230#
231# epub_uid = ''
232
233# A list of files that should not be packed into the epub file.
234epub_exclude_files = ['search.html']
235
236
237# -- Extension configuration -------------------------------------------------
238
239# blockdiag/etc. config
240
241rackdiag_antialias = True
242rackdiag_html_image_format = "SVG"
243rackdiag_fontpath = [
244 "_static/fonts/Inconsolata-Regular.ttf",
245 "_static/fonts/Inconsolata-Bold.ttf",
246]
247
248nwdiag_antialias = True
249nwdiag_html_image_format = "SVG"
250nwdiag_fontpath = [
251 "_static/fonts/Inconsolata-Regular.ttf",
252 "_static/fonts/Inconsolata-Bold.ttf",
253]
254
255# -- Options for todo extension ----------------------------------------------
256# If true, `todo` and `todoList` produce output, else they produce nothing.
257todo_include_todos = True
258
259# -- Options for linkcheck ---------------------------------------------------
260# The link checker strips off .md from links and then complains
261linkcheck_ignore = [
Zack Williams9e6c2722021-09-20 16:38:32 -0700262 r'https://jenkins\.opencord\.org/job/aether-member-only-jobs/.*',
Wei-Yu Chen91d90de2021-10-18 22:06:12 +0800263 r'https://jenkins.aetherproject.org/.*',
264 r'https://gerrit.opencord.org/.*',
265 r'https://sas.goog/.*',
Scott Bakerdb4527e2021-11-03 16:34:40 -0700266 r'https://www.fs.com/.*',
Scott Baker8ca82322022-01-26 09:19:31 -0800267 r'https://velero.io/.*',
Hyunsun Moond1e87332022-02-18 15:07:20 -0800268 r'https://cloud.google.com/.*',
llpb3534642023-08-02 09:23:52 -0700269 r'https://ark.intel.com/.*',
Zack Williams7f708f82020-07-07 12:18:20 -0700270]
271
Zack Williams1ae109e2021-07-27 11:17:04 -0700272linkcheck_timeout = 3
273linkcheck_retries = 2
274
Zack Williams34c30e52020-11-16 10:55:00 -0700275# -- options for Intersphinx extension ---------------------------------------
276
277intersphinx_mapping = {
Zack Williams9026f532020-11-30 11:34:32 -0700278 'ansible': ('https://docs.ansible.com/ansible/latest', None),
Zack Williams34c30e52020-11-16 10:55:00 -0700279 'sphinx': ('https://www.sphinx-doc.org/en/master', None),
280 'trellis': ('https://docs.trellisfabric.org/master', None),
Zack Williams44faef92022-03-08 22:07:49 -0700281 'sdcore': ('https://docs.sd-core.opennetworking.org/master', None),
282 'sdran': ('https://docs.sd-ran.org/master', None),
283 'sdfabric': ('https://docs.sd-fabric.org/master', None),
Zack Williams1ae109e2021-07-27 11:17:04 -0700284 'sysapproach5g': ('https://5g.systemsapproach.org/', None),
285 'sysapproachnet': ('https://book.systemsapproach.org/', None),
286 'sysapproachsdn': ('https://sdn.systemsapproach.org/', None),
Charles Chan770bb612022-03-02 12:34:04 -0800287 'sdfabric': ('https://docs.sd-fabric.org/master', None),
Zack Williams34c30e52020-11-16 10:55:00 -0700288 }
289
Zack Williams7f708f82020-07-07 12:18:20 -0700290def setup(app):
291
292 app.add_css_file('css/rtd_theme_mods.css')