# How to link to a type definition?

**URL:** <https://discourse.julialang.org/t/how-to-link-to-a-type-definition/126332>\
**Category:** General Usage\
**Tags:** question, package, documenter, markdown\
**Created:** [February 26, 2025, 10:28am UTC](https://discourse.julialang.org/t/how-to-link-to-a-type-definition/126332 "2025-02-26T10:28:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [February 26, 2025, 10:28am UTC](https://discourse.julialang.org/t/how-to-link-to-a-type-definition/126332/1 "2025-02-26T10:28:29Z")

</div>

How can I link to a type definition in a docstring?

Not working:

```julia
"""
    calculate_AIC_matrices!(body_aero::BodyAerodynamics, model::[Model](@ref), 
                         core_radius_fraction::Float64,
                         va_norm_array::Vector{Float64}, 
                         va_unit_array::Matrix{Float64})

Calculate Aerodynamic Influence Coefficient matrices.

Returns:
    Tuple of (AIC_x, AIC_y, AIC_z) matrices
"""

```

In the generated html documentation I would like to be able to click on `Model` and would like to see the definition of this type.

---

<div class="post-metadata">

**Author:** ![gwr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gwr/32/33632_2.png) [@gwr](https://discourse.julialang.org/u/gwr)\
**Post date:** [February 26, 2025, 12:11pm UTC](https://discourse.julialang.org/t/how-to-link-to-a-type-definition/126332/2 "2025-02-26T12:11:26Z")

</div>

Isn’t giving a markdown link for a _type position_ of a function signature an issue here? E.g., maybe this will work:

```julia
"""
    calculate_AIC_matrices!(
        body_aero::BodyAerodynamics,
        model::Model,
        core_radius_fraction::Float64,
        va_norm_array::Vector{Float64},
        va_unit_array::Matrix{Float64}
    )

Calculate Aerodynamic Influence Coefficient (AIC) matrices for the given `model`,
which is of type [`Model`](@ref).
...
"""

```

---

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [February 26, 2025, 9:53pm UTC](https://discourse.julialang.org/t/how-to-link-to-a-type-definition/126332/3 "2025-02-26T21:53:18Z")

</div>

> [@ufechner7](#):
>
> Not working:

> [@ufechner7](#):
>
> `model::[Model](@ref)`

Markdown link syntax can’t be used within a code block. Indentation of four or more spaces is one of the ways to create a code block in Markdown.
