doc: extensions: api_overview: do not hardcode github URL

Add a new extension config value so that repo URL is not hardcoded in
the extension code.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2025-01-02 10:59:25 +01:00 committed by Benjamin Cabé
commit 17806f2054
2 changed files with 3 additions and 1 deletions

View file

@ -86,7 +86,7 @@ class ApiOverview(SphinxDirective):
def visit_group(self, group, all_groups, rows, indent=0):
version = since = ""
github_uri = "https://github.com/zephyrproject-rtos/zephyr/releases/tag/"
github_uri = self.config.api_overview_base_url + "/releases/tag/"
cdef = group.get_compounddef()[0]
ssects = [
@ -150,6 +150,7 @@ class ApiOverview(SphinxDirective):
def setup(app) -> dict[str, Any]:
app.add_config_value("api_overview_doxygen_out_dir", "", "env")
app.add_config_value("api_overview_base_url", "", "env")
app.add_directive("api-overview-table", ApiOverview)

View file

@ -364,6 +364,7 @@ linkcheck_anchors = False
# -- Options for zephyr.api_overview --------------------------------------
api_overview_doxygen_out_dir = str(doxyrunner_projects["zephyr"]["outdir"])
api_overview_base_url = "https://github.com/zephyrproject-rtos/zephyr"
def setup(app):
# theme customizations