#site-wide banner?
4 messages · Page 1 of 1 (latest)
Hi @bleak charm. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Astro itself doesn’t have a built‑in “site‑wide banner” feature, but Starlight (the Astro-powered docs theme) does have a banner frontmatter field that shows an announcement banner per page. [banner frontmatter]
By default, that banner is per page, not global. The official docs only mention:
---
title: Page with a banner
banner:
content: |
We just launched something cool!
<a href="<https://example.com">Check> it out</a>
---
which displays a banner on that page only. [banner frontmatter]
There is a community recipe specifically titled “Add a sitewide banner to Starlight”, which explains how to turn this per‑page banner feature into a site‑wide one, but the detailed steps are not included in the knowledge I have—only the link is referenced. [Community content]
So, based on the available sources:
- Starlight supports per‑page banners via
bannerfrontmatter. - A site‑wide banner is possible using that mechanism, but the exact implementation details are only referenced in an external community guide that I can’t quote from here.
To implement a true site‑wide banner in Starlight, you’ll need to follow that external guide: “Add a sitewide banner to Starlight” linked from the Starlight community content page. [Community content]