-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathconf.py
executable file
·60 lines (43 loc) · 1.67 KB
/
conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
from datetime import datetime
from pathlib import Path
import os
import re
SPINNER_BASE = os.environ["SPINNER_BASE"]
DOXYGEN_OUTPUT_DIRECTORY = os.environ["DOXYGEN_OUTPUT_DIRECTORY"]
# Project ----------------------------------------------------------------------
project = "Spinner"
author = "Teslabs Engineering S.L."
year = 2021
copyright = f"{year}, {author}"
cmake = Path(SPINNER_BASE) / "spinner" / "CMakeLists.txt"
with open(cmake) as f:
version = re.search(r"project\(.*VERSION\s+([0-9\.]+).*\)", f.read()).group(1)
# Options ----------------------------------------------------------------------
extensions = [
"sphinx.ext.intersphinx",
"breathe",
"sphinx.ext.mathjax",
"sphinxcontrib.bibtex",
"matplotlib.sphinxext.plot_directive",
]
numfig = True
# HTML output ------------------------------------------------------------------
html_theme = "sphinx_rtd_theme"
html_theme_options = {
"logo_only": True,
"collapse_navigation": False,
}
html_static_path = ["_static"]
html_logo = "_static/images/logo.svg"
# Options for intersphinx ------------------------------------------------------
intersphinx_mapping = {"zephyr": ("https://docs.zephyrproject.org/latest", None)}
# Options for breathe ----------------------------------------------------------
breathe_projects = {"app": str(Path(DOXYGEN_OUTPUT_DIRECTORY) / "xml")}
breathe_default_project = "app"
breathe_domain_by_extension = {"h": "c", "c": "c"}
breathe_default_members = ("members", )
# Options for sphinxcontrib.bibtex ---------------------------------------------
bibtex_bibfiles = ["bibliography.bib"]
def setup(app):
app.add_css_file("css/custom.css")
app.add_css_file("css/light.css")