Developer Programs

Learn

Docs

Banner

Formatting your Content > Banner
content
content

You can optionally use an eye-catching banner to display an important announcement below the header of every page of your documentation site.

An information banner with a link to more info, displayed at desktop size
Desktop banner
The same banner, displayed at mobile size
Mobile banner

This banner can display in one of 4 stylesinformation, success, warning, and error – in order to provide more context for the banner text.

Each style displays a different icon and color for the banner.

Information style banner
Information style banner
Warning style banner
Warning style banner
Error style banner
Error style banner
Success style banner
Success style banner

Defining a banner

You’ll define the banner using values under the param section of your config.yaml file:

  • bannerText:
    • This is the text of the banner message.
    • If this value is blank, no banner will display. This is how you display or hide the banner.
    • It’s best to keep this text as short as possible to keep the banner area small. You can provide a link to a URL that provides more details.
  • bannerStyle:
    • This determines the banner colors and icon.
    • One of information, success, warning, or error.
  • bannerLinkText:
    • If your banner should offer a link for more information, this value specifies the text for that link.
  • bannerLinkUrl:
    • If your banner should offer a link for more information, this value specifies the URL for that link.
    • No link will display if this value is blank.
  • bannerIcon:
    • The banner automatically displays an icon appropriate for your bannerStyle value, but you can override the icon displayed by specifying the name of one of the other jhDocs icons.
  • bannerStartDate:
    • If you want your banner to only display within a specific date and time range, then this value specifies the date/time when the banner will start displaying.
    • If you only specify a date value, the associated time value will be midnight on that date.
    • See this link for date/time formatting options.
  • bannerEndDate:
    • If you want your banner to only display within a specific date and time range, then this value specifies the date/time when the banner will stop displaying.
    • If you only specify a date value, the associated time value will be midnight on that date.
    • See this link for date/time formatting options.

Start and end date usage

The bannerStartDate and bannerEndDate parameters are meant to avoid situations where the banner should start or end displaying at an inconvenient date or time, say, over a weekend when it would be inconvenient for your team to have to push an update to start or stop the banner. However they are not a substitute for ever pushing an update to remove a banner.

Next topic: Diagrams

Support options
Have questions on this topic?
Join the jhDocs team in Microsoft Teams to connect with the community.
See something in this page that needs to change?
Send us feedback on this page.

Did this page help you?

Last updated Tue Feb 11 2025