Skip to content

Commit

Permalink
Rework interref
Browse files Browse the repository at this point in the history
Inherit Sphinx intersphinx extension instead of maintaining a
duplicated version of it.
Update the guidelines to prefer the :ref:`inv:label` syntax over
:ref-inv:`label`.
The former does not require patching for a "try link local then
remote" for custom user guides.

Signed-off-by: Jorge Marques <[email protected]>
  • Loading branch information
gastmaier committed Sep 23, 2024
1 parent 8c2601e commit e438d74
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 588 deletions.
5 changes: 4 additions & 1 deletion adi_doctools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from .directive import setup as directive_setup
from .role import setup as role_setup
from .lut import get_lut
from .role.interref import interref_repos_apply

__version__ = "0.3.43"

Expand Down Expand Up @@ -55,6 +56,8 @@ def html_page_context(app, pagename, templatename, context, doctree):
def config_inited(app, config):
app.lut = get_lut()

interref_repos_apply(app)

# Inject version value, config entry has higher precedence
if 'version' not in config:
doc_version = getenv("ADOC_DOC_VERSION", default="")
Expand Down Expand Up @@ -122,9 +125,9 @@ def setup(app):

app.add_post_transform(wrap_elements)

app.connect("html-page-context", html_page_context)
app.connect("config-inited", config_inited)
app.connect("builder-inited", builder_inited)
app.connect("html-page-context", html_page_context)
app.connect("build-finished", build_finished)

return {
Expand Down
Loading

0 comments on commit e438d74

Please sign in to comment.