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