Interlinks filter - autolink mode

Autolink mode enables you to convert inline code, like `get_object()`, into a link to the function’s reference page. It is an interlinks filter setting, enabled by setting autolink: true.

Basic use

Here is a basic example of enabling autolink mode in your _quarto.yml file:

filters:
  # requires running quarto add machow/quartodoc
  - interlinks

interlinks:
  # enable autolink mode
  autolink: true
  # aliases allow you to refer to functions
  # without their module name, or using a shortened name
  aliases:
    quartodoc: [null, qd]

Note that in addition to enabling autolink mode, the _quarto.yml above uses aliases: to allow you to refer to quartodoc functions, without needing the module name. For example, using get_object instead of quartodoc.get_object.

link style link syntax result
full path `quartodoc.get_object()` quartodoc.get_object()
alias (qd) `qd.get_object()` qd.get_object()
alias (null) `get_object()` get_object()
shortening () `~~quartodoc.get_object()` get_object()
short dot () `~~.quartodoc.get_object()` .get_object()
unmatched link `~~unmatched_func()` unmatched_func()

What gets autolinked?

Any inline code that resembles a item name in interlink syntax will be autolinked. In addition, autolink mode supports names with parentheses at the end. Below are some examples.

Linked:

  • `a.b.c`
  • `a.b.c()`

Not linked:

  • `a.b.c(x=1)`
  • `a.b.c + a.b.c`
  • `-a.b.c`