Skip to content

Banners: Support start/end dates for announcement banners #19543

Description

@CamSoper

Problem

The sitewide announcement banner is configured in data/announcements.yml. Today an entry is shown or hidden via a manual active: true|false toggle. There is no way to schedule a banner to turn off (or on) automatically.

This bit us during launch week: the launch-week banner stayed up after the campaign ended because someone had to remember to flip it off. It took a manual PR (#19542) to take it down, and in the meantime the stale banner lingered on the blog (with a side of caching confusion).

Request

Add optional scheduling fields to each announcement entry so banners activate and expire on their own, e.g.:

announcements:
  - id: blog-agentic-infrastructure-era-2026-05-Kp4nQ2
    active: true
    start: 2026-06-01   # optional — show on/after this date
    end: 2026-06-05     # optional — stop showing after this date
    display: both
    ...

Suggested behavior:

  • start and end are both optional. Omitting start means "active immediately"; omitting end means "no expiry" (current behavior).
  • An entry renders only when it is active: true and the current date is within the [start, end] window.
  • Keep the existing active flag as a hard master switch so an entry can be force-disabled regardless of dates.
  • Decide and document the timezone semantics (UTC is probably simplest) and whether end is inclusive.
  • Update the header comment in data/announcements.yml to document the new fields.

Why

  • No more stale banners haunting the blog after a campaign ends.
  • No need to remember to cut a takedown PR — schedule it once when the banner goes up.

Context

Requested in Slack by Tatiana Cooke, with a +1 from Pablo Seibelt ("It'd be nice to be able to set them to have start/end date instead so we don't need to remember to take it down"). Filed at Cam Soper's request.

Slack thread: https://pulumi.slack.com/archives/CCBFCGU94/p1780698059160009

Metadata

Metadata

Assignees

Labels

area/automationIssues relating to automation (mostly GHA workflows) and automatically generated contentkind/enhancement

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions