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 aff04d7
Browse filesBrowse the repository at this point in the historyBrowse files
[Sync to prerelease] docs: document image-alt levels and page-level image options (#2292)
The `image-alt` key at its different levels was undocumented outside
about pages and listing items, though Quarto reads all of them for the
og:image:alt and twitter:image:alt tags. Add an `image-alt` row to the
Twitter Card and Open Graph tables, and describe in Preview Images where
the alt text comes from: the page's `image-alt` next to `image`,
`website: image-alt` for the site-level image, the image's own alt text
when the preview image is found in the page, and a per-service override.
About pages fall back to the document-level `image-alt` and
`image-title`, and a page's `image-lazy-loading` overrides the listing
option for that page's item. Say so in the about and listings pages.
(cherry picked from commit a0411c6)
Copy file name to clipboardExpand all lines: docs/websites/website-about.qmd
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -116,6 +116,8 @@ about:
116
116
image-shape: round
117
117
```
118
118
119
+
`image-alt`and `image-title` can also be set at the document level, next to `image`. Values under `about` take precedence.
120
+
119
121
### Links
120
122
121
123
Your about page also may contain a set of links to other resources about you or your organization. Each template will render these links in a slightly different way. Here are the options that you can specify for each link:
| `image-lazy-loading` | When `true`, listing images are loaded only as they come into view. When `false`, images are automatically loaded. Default: `true`|
201
+
| | |
202
+
| | A page can override this for its own item by setting `image-lazy-loading` in its front matter. |
| `image-alt` | Alternative text for the preview image. By default, Quarto uses the alt text that goes with the preview image. For more information, see [Preview Images]. |
| `card-style` | Either `summary` or `summary_large_image`. If this is not provided, the best style will automatically selected based upon other metadata. You can learn more about Twitter Card styles [here](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards). |
| `image-alt` | Alternative text for the preview image. By default, Quarto uses the alt text that goes with the preview image. For more information, see [Preview Images]. |
| `site-name` | The name which should be displayed for the overall site. If not explicitly provided in the `open-graph` metadata, Quarto will use the `website:title` value. |
@@ -219,10 +223,13 @@ If you'd like to provide a default that is used when pages specify a preview ima
With a `site-url`, a relative path in `_quarto.yml`, for `website: image` or for `image` under `website: open-graph` or `website: twitter-card`, is relative to the project directory, whichever page uses it.
225
230
231
+
Use `image-alt` to provide alternative text for the preview image. Set it next to `image` in the page front matter, or under `website` for the site-level default as above. `website: image-alt` is only used for pages that fall back to the site-level image. When Quarto finds the preview image in the page, it uses that image's alt text (for example, from `fig-alt`), and the page's `image-alt` if the image has none. To use different alt text for one service, set `image-alt` under `twitter-card` or `open-graph`.
232
+
226
233
If you would like to prevent preview image discovery on a page, set `image` to `false`:
0 commit comments