Skip to content

Commit 17806f2

Browse files
gmarullkartben
authored andcommitted
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 <[email protected]>
1 parent 29257f6 commit 17806f2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

doc/_extensions/zephyr/api_overview.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def generate_table(self, toplevel, groups):
8686

8787
def visit_group(self, group, all_groups, rows, indent=0):
8888
version = since = ""
89-
github_uri = "https://github.com/zephyrproject-rtos/zephyr/releases/tag/"
89+
github_uri = self.config.api_overview_base_url + "/releases/tag/"
9090
cdef = group.get_compounddef()[0]
9191

9292
ssects = [
@@ -150,6 +150,7 @@ def visit_group(self, group, all_groups, rows, indent=0):
150150

151151
def setup(app) -> dict[str, Any]:
152152
app.add_config_value("api_overview_doxygen_out_dir", "", "env")
153+
app.add_config_value("api_overview_base_url", "", "env")
153154

154155
app.add_directive("api-overview-table", ApiOverview)
155156

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@
364364
# -- Options for zephyr.api_overview --------------------------------------
365365

366366
api_overview_doxygen_out_dir = str(doxyrunner_projects["zephyr"]["outdir"])
367+
api_overview_base_url = "https://github.com/zephyrproject-rtos/zephyr"
367368

368369
def setup(app):
369370
# theme customizations

0 commit comments

Comments
 (0)