The Announcement Banner
The announcement banner appears in the fixed header on every page of your site — above the navbar by default, or below it if you prefer. It is useful for highlighting new releases, deprecation notices, migration information, or any other message you want every visitor to see.
Gradient Background
You can replace the solid-color background with an animated gradient by adding a style key. The value should be one of the gradient preset names (sky, peach, prism, lilac, slate, honey, dusk, or mint):
great-docs.yml
announcement:
content: "Check out our new tutorials section!"
style: mint
dismissable: trueWhen style is set, the gradient overrides the type background color.
Position
By default the banner sits above the navbar. Set position to below-navbar to place it after the navbar instead. Either way the banner stays in the fixed header at the top of the page:
great-docs.yml
announcement:
content: "Scheduled maintenance this weekend."
type: warning
position: below-navbar| Position | Placement |
|---|---|
above-navbar |
Above the navbar (default) |
below-navbar |
Below the navbar |
Persistent vs. Dismissable
By default, banners are dismissable: visitors can click the close button to hide them. The dismissal is stored in session storage, so the banner stays hidden for the rest of the browsing session but reappears when the browser is reopened.
To make a banner that cannot be dismissed (useful for critical notices), set dismissable to false:
great-docs.yml
announcement:
content: "This package is deprecated. Use new-package instead."
type: danger
dismissable: false