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