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
{{ message }}
Repository navigation
Commit 3831e28
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/websites/website-listings.qmd
+33Lines changed: 33 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -233,6 +233,39 @@ It is possible to customize the appearance of listings using the following optio
233
233
234
234
In addition to the above listing-wide options, each listing type has a variety of options to customize its appearance.
235
235
236
+
### Link Targets
237
+
238
+
{{< prerelease-callout 1.12 >}}
239
+
240
+
Use the `target` and `rel` options to set the `target` and `rel` attributes of the item links.
241
+
These options have the same meaning as the `target` and `rel` options of navigation items.
242
+
They apply to default, grid, and table listings.
243
+
You can set them on the listing, on an item in the listing `contents`, or in a listed document's front matter.
244
+
Values in `contents` override the document's front-matter values.
245
+
For each option, a nonempty item value overrides the listing value.
246
+
For example, this listing opens all items in a new tab, except the local post:
247
+
248
+
``` yaml
249
+
listing:
250
+
target: _blank
251
+
contents:
252
+
- path: https://example.com/article
253
+
title: "External article"
254
+
- path: posts/local-post.qmd
255
+
title: "Local post"
256
+
target: _self
257
+
```
258
+
259
+
If `target` opens a new tab and `rel` is not set, `rel` is `noopener`.
260
+
An explicit listing or item `target` takes precedence over `link-external-newwindow`.
261
+
For example, `target: _self` keeps an external item in the current tab even when `link-external-newwindow: true`.
262
+
263
+
Listing item links with `target: _blank` receive the accessible description "(opens in a new tab)".
264
+
This applies to internal and external listing links, independently of `link-external-newwindow`.
265
+
266
+
With `table-hover: true`, clicking a table row also honors its item link's `target` and `rel`.
267
+
RSS feeds and custom listing templates do not apply these options automatically.
268
+
236
269
## Categories
237
270
238
271
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:
0 commit comments