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:
parent
29257f60fe
commit
17806f2054
2 changed files with 3 additions and 1 deletions
|
@ -86,7 +86,7 @@ class ApiOverview(SphinxDirective):
|
||||||
|
|
||||||
def visit_group(self, group, all_groups, rows, indent=0):
|
def visit_group(self, group, all_groups, rows, indent=0):
|
||||||
version = since = ""
|
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]
|
cdef = group.get_compounddef()[0]
|
||||||
|
|
||||||
ssects = [
|
ssects = [
|
||||||
|
@ -150,6 +150,7 @@ class ApiOverview(SphinxDirective):
|
||||||
|
|
||||||
def setup(app) -> dict[str, Any]:
|
def setup(app) -> dict[str, Any]:
|
||||||
app.add_config_value("api_overview_doxygen_out_dir", "", "env")
|
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)
|
app.add_directive("api-overview-table", ApiOverview)
|
||||||
|
|
||||||
|
|
|
@ -364,6 +364,7 @@ linkcheck_anchors = False
|
||||||
# -- Options for zephyr.api_overview --------------------------------------
|
# -- Options for zephyr.api_overview --------------------------------------
|
||||||
|
|
||||||
api_overview_doxygen_out_dir = str(doxyrunner_projects["zephyr"]["outdir"])
|
api_overview_doxygen_out_dir = str(doxyrunner_projects["zephyr"]["outdir"])
|
||||||
|
api_overview_base_url = "https://github.com/zephyrproject-rtos/zephyr"
|
||||||
|
|
||||||
def setup(app):
|
def setup(app):
|
||||||
# theme customizations
|
# theme customizations
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue