Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions docs/websites/website-listings.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,39 @@ It is possible to customize the appearance of listings using the following optio

In addition to the above listing-wide options, each listing type has a variety of options to customize its appearance.

### Link Targets

{{< prerelease-callout 1.12 >}}

Use the `target` and `rel` options to set the `target` and `rel` attributes of the item links.
These options have the same meaning as the `target` and `rel` options of navigation items.
They apply to default, grid, and table listings.
You can set them on the listing, on an item in the listing `contents`, or in a listed document's front matter.
Values in `contents` override the document's front-matter values.
For each option, a nonempty item value overrides the listing value.
For example, this listing opens all items in a new tab, except the local post:

``` yaml
listing:
target: _blank
contents:
- path: https://example.com/article
title: "External article"
- path: posts/local-post.qmd
title: "Local post"
target: _self
```

If `target` opens a new tab and `rel` is not set, `rel` is `noopener`.
An explicit listing or item `target` takes precedence over `link-external-newwindow`.
For example, `target: _self` keeps an external item in the current tab even when `link-external-newwindow: true`.

Listing item links with `target: _blank` receive the accessible description "(opens in a new tab)".
This applies to internal and external listing links, independently of `link-external-newwindow`.

With `table-hover: true`, clicking a table row also honors its item link's `target` and `rel`.
RSS feeds and custom listing templates do not apply these options automatically.

## Categories

In addition to displaying the listing contents, listings can also automatically add a list of categories to the page that they appear on. To enable categories you can set the `categories` option like:
Expand Down
Loading