blob: 8a2aef51bb1b93c657474cee21999ebbcc5b1dd3 [file] [log] [blame]
John DeNisco06dcd452018-07-26 12:45:10 -04001# -*- 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/stable/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
Nathan Skrzypczak9ad39c02021-08-19 11:38:06 +020019import subprocess
20
John DeNisco06dcd452018-07-26 12:45:10 -040021# -- Project information -----------------------------------------------------
22
John DeNiscoc96d6182019-11-06 10:58:28 -080023project = u'The Vector Packet Processor'
Dave Wallaced1706812021-08-12 18:36:02 -040024copyright = u'2018-2021, Linux Foundation'
25author = u'FD.io VPP Community'
John DeNisco06dcd452018-07-26 12:45:10 -040026
27# The short X.Y version
Nathan Skrzypczak9ad39c02021-08-19 11:38:06 +020028version = subprocess.run(["git", "describe"], stdout=subprocess.PIPE, text=True).stdout
John DeNisco06dcd452018-07-26 12:45:10 -040029# The full version, including alpha/beta/rc tags
Nathan Skrzypczak9ad39c02021-08-19 11:38:06 +020030release = subprocess.run(["git", "describe", "--long"], stdout=subprocess.PIPE, text=True).stdout
John DeNisco06dcd452018-07-26 12:45:10 -040031
32
33# -- General configuration ---------------------------------------------------
34
35# If your documentation needs a minimal Sphinx version, state it here.
36#
37# needs_sphinx = '1.0'
38
39# Add any Sphinx extension module names here, as strings. They can be
40# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
41# ones.
42extensions = [
43 'sphinx.ext.autodoc',
44 'sphinx.ext.viewcode',
Paul Vinciguerraa26f5442020-03-11 13:28:27 -040045 'recommonmark',
46 'sphinxcontrib.spelling']
John DeNisco06dcd452018-07-26 12:45:10 -040047
Paul Vinciguerra340c15c2019-11-05 15:34:36 -050048spelling_word_list_filename = 'spelling_wordlist.txt'
Nathan Skrzypczak9ad39c02021-08-19 11:38:06 +020049
50# do not spell check those files
51spelling_exclude_patterns = ['aboutvpp/releasenotes/*']
52
John DeNisco06dcd452018-07-26 12:45:10 -040053# Add any paths that contain templates here, relative to this directory.
54templates_path = ['_templates']
55
56# The suffix(es) of source filenames.
57# You can specify multiple suffix as a list of string:
58#
jdenisco8a6e1b12019-05-13 12:40:21 -040059source_suffix = {
60 '.rst': 'restructuredtext',
61 '.md': 'markdown'
Paul Vinciguerra340c15c2019-11-05 15:34:36 -050062}
jdenisco8a6e1b12019-05-13 12:40:21 -040063
John DeNisco06dcd452018-07-26 12:45:10 -040064# The master toctree document.
65master_doc = 'index'
66
67# The language for content autogenerated by Sphinx. Refer to documentation
68# for a list of supported languages.
69#
70# This is also used if you do content translation via gettext catalogs.
71# Usually you set "language" from the command line for these cases.
72language = None
73
74# List of patterns, relative to source directory, that match files and
75# directories to ignore when looking for source files.
76# This pattern also affects html_static_path and html_extra_path .
Nathan Skrzypczak9ad39c02021-08-19 11:38:06 +020077exclude_patterns = ['Thumbs.db', '.DS_Store', '_scripts', 'venv', '_generated']
John DeNisco06dcd452018-07-26 12:45:10 -040078
79# The name of the Pygments (syntax highlighting) style to use.
80pygments_style = 'default'
81
82
83# -- Options for HTML output -------------------------------------------------
84
85# The theme to use for HTML and HTML Help pages. See the documentation for
86# a list of builtin themes.
87#
88
89# import sphinx_theme
90
91html_theme = "sphinx_rtd_theme"
92# html_theme = 'neo_rtd_theme'
93
94html_theme_path = ["_themes", ]
95# html_theme_path = [sphinx_theme.get_html_theme_path('neo-rtd-theme')]
96
97# All available themes:
98# print(sphinx_theme.THEME_LIST)
99# >> ['stanford_theme', 'neo_rtd_theme']
100
101# The name of an image file (relative to this directory) to place at the top
102# of the sidebar.
103html_logo = '_static/fd-io_red_white.png'
104
105# Theme options are theme-specific and customize the look and feel of a theme
106# further. For a list of options available for each theme, see the
107# documentation.
108#
109# html_theme_options = {}
110
111# Add any paths that contain custom static files (such as style sheets) here,
112# relative to this directory. They are copied after the builtin static files,
113# so a file named "default.css" will overwrite the builtin "default.css".
114html_static_path = ['_static']
115
Paul Vinciguerra340c15c2019-11-05 15:34:36 -0500116
John DeNisco06dcd452018-07-26 12:45:10 -0400117def setup(app):
Dave Wallaced1706812021-08-12 18:36:02 -0400118 app.add_css_file('css/rules.css')
John DeNisco06dcd452018-07-26 12:45:10 -0400119
120# Custom sidebar templates, must be a dictionary that maps document names
121# to template names.
122#
123# The default sidebars (for documents that don't match any pattern) are
124# defined by theme itself. Builtin themes are using these templates by
125# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
126# 'searchbox.html']``.
127#
128# html_sidebars = {}
129
130
131# -- Options for HTMLHelp output ---------------------------------------------
132
133# Output file base name for HTML help builder.
134htmlhelp_basename = 'Vector Packet Processor'
135
136
137# -- Options for LaTeX output ------------------------------------------------
138
139latex_elements = {
140 # The paper size ('letterpaper' or 'a4paper').
141 #
142 # 'papersize': 'letterpaper',
143
144 # The font size ('10pt', '11pt' or '12pt').
145 #
146 # 'pointsize': '10pt',
147
148 # Additional stuff for the LaTeX preamble.
149 #
150 # 'preamble': '',
151
152 # Latex figure (float) alignment
153 #
154 # 'figure_align': 'htbp',
155}
156
157# Grouping the document tree into LaTeX files. List of tuples
158# (source start file, target name, title,
159# author, documentclass [howto, manual, or own class]).
160latex_documents = [
Paul Vinciguerra340c15c2019-11-05 15:34:36 -0500161 (master_doc, 'Vector Packet Processor.tex',
162 u'Vector Packet Processor Documentation',
John DeNisco06dcd452018-07-26 12:45:10 -0400163 u'John DeNisco', 'manual'),
164]
165
166
167# -- Options for manual page output ------------------------------------------
168
169# One entry per manual page. List of tuples
170# (source start file, name, description, authors, manual section).
171man_pages = [
Paul Vinciguerra340c15c2019-11-05 15:34:36 -0500172 (master_doc, 'Vector Packet Processor',
173 u'Vector Packet Processor Documentation',
John DeNisco06dcd452018-07-26 12:45:10 -0400174 [author], 1)
175]
176
177
178# -- Options for Texinfo output ----------------------------------------------
179
180# Grouping the document tree into Texinfo files. List of tuples
181# (source start file, target name, title, author,
182# dir menu entry, description, category)
183texinfo_documents = [
Paul Vinciguerra340c15c2019-11-05 15:34:36 -0500184 (master_doc, 'Vector Packet Processor',
185 u'Vector Packet Processor Documentation',
John DeNisco06dcd452018-07-26 12:45:10 -0400186 author, 'Vector Packet Processor', 'One line description of project.',
187 'Miscellaneous'),
188]
189
190
191# -- Extension configuration -------------------------------------------------