Announcement banner
Overview
A website can show a short announcement at the top of its pages, inside
the site header: a beta notice, a pointer to release notes, a warning
that some pages are still in progress. Set it once in _quarto.yml:
website:
announcement: "This site is in beta. Expect rough edges."The text is markdown, so emphasis, code and links work:
website:
announcement: "Quarto 2 is out! Read the [release notes](news.qmd)."Links are written relative to the project root, like the other links in
_quarto.yml, and resolve to the right URL on every page.
Options
To change how the banner looks or behaves, use the map form, with the
text under content:
website:
announcement:
content: "Some pages have not been reviewed yet."
type: warning
icon: info-circle
position: below-navbar
dismissable: true| option | values | default |
|---|---|---|
content
|
markdown text | (required) |
type
|
primary, secondary, success, danger, warning, info, light, dark
|
primary
|
icon
|
a Bootstrap icon name, such as info-circle or megaphone
|
none |
position
|
above-navbar, below-navbar
|
above-navbar
|
dismissable
|
true, false
|
true
|
remember-dismissal
|
true, false
|
true
|
type picks the banner’s colors, using the matching Bootstrap alert
style. A site without a navbar still shows the banner at the top of the
page.
llms.txt
When the site produces llms.txt output, the
announcement is left out of the markdown companions, llms.txt and
llms-full.txt. It is site chrome, like the navbar and footer, not page
content.
Differences from Quarto 1
- A page can turn the announcement off, or change its options, in its
front matter or
_metadata.yml. Quarto 1 reads the announcement only from_quarto.yml. remember-dismissalis new in Quarto 2.- The close control is a keyboard-accessible button with a label for screen readers.