Skip to content

Commit 1f6d4b7

Browse files
committed
docs: docstring examples interlink section
1 parent 7fbe12e commit 1f6d4b7

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

docs/get-started/docstring-examples.qmd

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,29 @@ def f() -> int:
105105
A number
106106
"""
107107
108-
```
108+
```
109+
110+
111+
## Using interlinks in docstrings
112+
113+
quartodoc supports linking to functions using the [interlinks quarto filter](./interlinks.qmd) (and linking in general using [quarto link syntax](./crossrefs.qmd)).
114+
115+
The code below shows an interlink, along with a regular quarto link.
116+
117+
```python
118+
def f():
119+
"""A function.
120+
121+
Interlinks filter:
122+
123+
See [](`quartodoc.get_object`)
124+
125+
Regular quarto link (to a page in your docs):
126+
127+
See the [reference](/reference/index.qmd) page.
128+
"""
129+
```
130+
131+
:::{.callout-note}
132+
Linking to functions documented outside your package must be configured in the [interlinks filter](./interlinks.qmd).
133+
:::

0 commit comments

Comments
 (0)