-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathconf.py
More file actions
110 lines (85 loc) · 3.24 KB
/
conf.py
File metadata and controls
110 lines (85 loc) · 3.24 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Copyright (c) 2025 Nordic Semiconductor
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
import os
import sys
from pathlib import Path
# Paths ------------------------------------------------------------------------
NRF_BM_BASE = Path(__file__).absolute().parents[2]
sys.path.insert(0, str(NRF_BM_BASE / "doc" / "_utils"))
import redirects # noqa: E402
import utils # noqa: E402
ZEPHYR_BASE = NRF_BM_BASE / ".." / "zephyr"
# General configuration --------------------------------------------------------
project = "nRF Connect SDK Bare Metal"
copyright = "2025, Nordic Semiconductor"
author = "Nordic Semiconductor"
version = release = os.environ.get("DOCSET_VERSION")
sys.path.insert(0, str(ZEPHYR_BASE / "doc" / "_extensions"))
extensions = [
"zephyr.html_redirects",
"zephyr.kconfig",
"zephyr.external_content",
"zephyr.doxyrunner",
"zephyr.doxybridge",
"sphinx_tabs.tabs",
"sphinx_togglebutton",
"sphinx_copybutton",
"sphinx.ext.intersphinx",
]
rst_epilog = """
.. include:: /substitutions.txt
.. include:: /links.txt
.. include:: /shortcuts.txt
"""
# -- Options for HTML output -------------------------------------------------
html_theme = "sphinx_ncs_theme"
html_static_path = [str(NRF_BM_BASE / "doc" / "_static")]
html_last_updated_fmt = "%b %d, %Y"
html_show_sourcelink = True
html_show_sphinx = False
html_theme_options = {
"docset": "nrf-bm",
"docsets": utils.ALL_DOCSETS,
"addons_url": "",
"bare_metal_url": "",
"ncs_url": "https://nrfconnectdocs.nordicsemi.com/ncs/latest/nrf/",
"ncs_label": "nRF Connect SDK Docs",
"logo_url": "https://docs.nordicsemi.com",
}
# Options for intersphinx ------------------------------------------------------
intersphinx_mapping = dict()
kconfig_mapping = utils.get_intersphinx_mapping("kconfig")
if kconfig_mapping:
intersphinx_mapping["kconfig"] = kconfig_mapping
# Options for external_content -------------------------------------------------
external_content_contents = [
(NRF_BM_BASE / "doc" / "nrf-bm", "*"),
(NRF_BM_BASE, "samples/**/*.rst"),
(NRF_BM_BASE / "components" / "softdevice" / "s115" / "doc", "s115*.main.rst"),
(NRF_BM_BASE / "components" / "softdevice" / "s145" / "doc", "s145*.main.rst"),
]
external_content_keep = ["versions.txt"]
# -- Options for doxyrunner plugin ---------------------------------------------
_doxyrunner_outdir = utils.get_builddir() / "html" / "nrf-bm" / "doxygen"
doxyrunner_doxygen = os.environ.get("DOXYGEN_EXECUTABLE", "doxygen")
doxyrunner_projects = {
"nrf": {
"doxyfile": NRF_BM_BASE / "doc" / "nrf-bm" / "nrf-bm.doxyfile.in",
"outdir": _doxyrunner_outdir,
"fmt": True,
"fmt_vars": {
"NRF_BM_BASE": str(NRF_BM_BASE),
"DOCSET_SOURCE_BASE": str(NRF_BM_BASE),
"DOCSET_BUILD_DIR": str(_doxyrunner_outdir),
"DOCSET_VERSION": version,
},
}
}
# -- Options for doxybridge plugin ---------------------------------------------
doxybridge_projects = {
"nrf-bm": _doxyrunner_outdir,
"s115": utils.get_builddir() / "html" / "s115",
"s145": utils.get_builddir() / "html" / "s145",
}
# Options for html_redirect ----------------------------------------------------
html_redirect_pages = redirects.NRF_BM