Product and version-specific announcement banners

Announcement banners can now be configured at multiple levels to target specific products or versions.

The override hierarchy is:

  1. Version-level - Highest priority, always shown when defined for a specific version
  2. Product-level - Used when no version-level announcement exists for a product
  3. Config-level - Fallback announcement shown across all products/versions when no specific override is defined

Add the announcement property directly to items in the products: or versions: lists in your docs.yml file:

docs.yml
1# Config-level announcement (fallback)
2announcement:
3 message: "Welcome to our documentation!"
4
5products:
6 - display-name: Docs
7 path: ./products/docs/docs.yml
8 # Product-level announcement
9 announcement:
10 message: "Docs product is in beta."
11
12 versions:
13 - display-name: v1
14 path: ./products/docs/v1/docs.yml
15 # Version-level announcement (highest priority)
16 announcement:
17 message: "v1 is in maintenance mode. Upgrade to v2."

Learn more about configuring announcement banners.