Skip to content

Commit 2d76285

Browse files
committed
docs: flesh out interlinks page
1 parent 7f17155 commit 2d76285

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

docs/get-started/interlinks.qmd

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,46 @@ jupyter:
77
name: python3
88
---
99

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.
1111

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

Comments
 (0)