### Install DocumenterInterLinks via Julia package manager Source: https://juliadocs.org/DocumenterInterLinks.jl Add the package using the Julia package manager. The command is entered in the Julia REPL after pressing ']'. ```julia ] add DocumenterInterLinks ``` -------------------------------- ### Basic @extref Syntax Source: https://juliadocs.org/DocumenterInterLinks.jl Examples of using @extref to create external links in Markdown, replacing the standard @ref syntax. ```markdown * [`Documenter.makedocs`](@extref) * [Documenter's `makedocs` function](@extref Documenter.makedocs) * See the section about Documenter's [Writers](@extref). ``` -------------------------------- ### Accessing an inventory via links dictionary Source: https://juliadocs.org/DocumenterInterLinks.jl Demonstrates accessing a specific inventory object from the links dictionary using its key. ```julia links["sphinx"] ``` -------------------------------- ### Inspecting InventoryItem Details Source: https://juliadocs.org/DocumenterInterLinks.jl Using DocInventories to inspect the structure of an InventoryItem, which reveals the domain and role information. ```julia using DocInventories DocInventories.show_full(links["Documenter"]["Documenter.makedocs"]) ``` ```text InventoryItem( name="Documenter.makedocs", domain="jl", role="function", priority=1, uri="lib/public/#Documenter.makedocs", dispname="Documenter.makedocs" ) ``` -------------------------------- ### Add DocumenterInterLinks to Project.toml Source: https://juliadocs.org/DocumenterInterLinks.jl Add the package UUID to the relevant Project.toml file, e.g., docs/Project.toml. ```toml DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656" ``` -------------------------------- ### Structure of a DocInventories.Inventory object Source: https://juliadocs.org/DocumenterInterLinks.jl Shows the structure of an Inventory object, including project metadata and a list of InventoryItem entries. ```julia Inventory( project="Sphinx", version="8.3.0", root_url="https://www.sphinx-doc.org/en/master/", items=[ InventoryItem(":js:function:`\$.getJSON`" => "usage/domains/javascript.html#getJSON"), InventoryItem(":c:member:`@alias.data`" => "usage/domains/c.html#c.\$", dispname="[anonymous].data"), InventoryItem(":c:function:`@alias.f`" => "usage/domains/c.html#c.\$", dispname="[anonymous].f"), InventoryItem(":c:functionParam:`@alias.f.k`" => "usage/domains/c.html#c.@alias.f", dispname="[anonymous].f.k"), InventoryItem(":cpp:type:`CustomList`" => "tutorial/describing-code.html#_CPPv410\$"), ⋮ (1782 elements in total) InventoryItem(":std:event:`write-started`" => "extdev/event_callbacks.html#event-\$", priority=1), InventoryItem(":std:label:`writing-builders`" => "extdev/builderapi.html#\$", dispname="Builder API"), InventoryItem(":std:confval:`xml_pretty`" => "usage/configuration.html#confval-\$", priority=1), InventoryItem(":std:label:`xref`" => "usage/referencing.html#\$", dispname="Cross-references"), InventoryItem(":std:label:`xref-modifiers`" => "usage/referencing.html#\$"), InventoryItem(":std:label:`xref-syntax`" => "usage/referencing.html#\$", dispname="Syntax"), ] ) ``` -------------------------------- ### Declare external projects with InterLinks Source: https://juliadocs.org/DocumenterInterLinks.jl Instantiate an InterLinks object in docs/make.jl to define external projects. Each entry maps a project name to a root URL, an inventory URL, or a tuple with root URL and inventory locations. The resulting links object must be passed to Documenter.makedocs via the plugins keyword. ```julia using DocumenterInterLinks links = InterLinks( "sphinx" => "https://www.sphinx-doc.org/en/master/", "matplotlib" => "https://matplotlib.org/3.7.3/objects.inv", "Julia" => ( "https://docs.julialang.org/en/v1/", joinpath(@__DIR__, "inventories", "Julia.toml") ), "Documenter" => ( "https://documenter.juliadocs.org/stable/", "https://documenter.juliadocs.org/stable/objects.inv", joinpath(@__DIR__, "inventories", "Documenter.toml") ), ); ``` -------------------------------- ### Advanced @extref with Domains and Roles Source: https://juliadocs.org/DocumenterInterLinks.jl Using Sphinx-style domain and role syntax within @extref for disambiguation. ```markdown * [`makedocs`](@extref :function:`Documenter.makedocs`) * [`makedocs`](@extref :jl:function:`Documenter.makedocs`) ``` -------------------------------- ### Disambiguating References with Inventory Names Source: https://juliadocs.org/DocumenterInterLinks.jl Specifying the inventory name within the @extref tag to clarify the target location. ```markdown * See the section about Documenter's [Writers](@extref Documenter). ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.