You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/get-started/interlinks.qmd
+42-2Lines changed: 42 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,46 @@ jupyter:
7
7
name: python3
8
8
---
9
9
10
-
Coming soon!
10
+
Coming soon! See the [interlinks folder](https://github.com/machow/quartodoc/tree/main/interlinks), which defines a WIP quarto filter for providing crossrefs.
11
11
12
-
See the [interlinks folder](https://github.com/machow/quartodoc/tree/main/interlinks), which defines a WIP quarto filter for providing crossrefs.
12
+
The interlinks filter allows you to provide crossreferences within and between documentation.
13
+
It requires of two parts:
14
+
15
+
1. Generating a sphinx inventory for your own docs.
16
+
2. Specifying sphinx inventories for the filter to use in your quarto configuration.
17
+
18
+
## Generating a sphinx inventory
19
+
20
+
A sphinx inventory file, generated by [create_inventory](/api/#sec-create_inventory),
21
+
and then dumped to JSON using [convert_inventory](/api/#sec-convert_inventory).
22
+
23
+
For an overview of the sphinx inventory format, see [the sphobjinv docs](https://sphobjinv.readthedocs.io)
24
+
25
+
## Configuring the interlinks filter
26
+
27
+
Configure the filter in `_quarto.yml` or on specific pages:
28
+
29
+
```
30
+
filters:
31
+
- interlinks
32
+
interlinks:
33
+
sources:
34
+
numpy:
35
+
url: https://numpy.org/doc/stable/
36
+
inv: null
37
+
fallback: objects_numpy.json
38
+
python:
39
+
url: https://docs.python.org/3/
40
+
inv: null
41
+
fallback: objects_python.json
42
+
```
43
+
44
+
Where files like `objects_numpy.json` and `objects_python.json` are their inventories converted to JSON, using the functions from the section above.
45
+
46
+
`objects.inv` live at the root of sphinx project urls:
47
+
48
+
* numpy: https://numpy.org/doc/stable/objects.inv
49
+
* python: https://docs.python.org/3/objects.inv
50
+
51
+
The rough idea is that this plugin will behave similar to [jupyterbook linking](https://jupyterbook.org/en/stable/content/references.html),
52
+
which supports both some intersphinx syntax, but also markdown syntax.
0 commit comments