Skip to main content

Announcement Banner

Show a dismissible announcement bar below the navbar site-wide — great for site notices, article teasers, or events.

Configuration​

announcement:
enable: true
content: Welcome to my personal site # announcement text (plain text)
link: https://example.com/post/1 # optional "learn more" link
link_text: Learn more # link text

Options​

FieldDescription
announcement.enableEnable the banner
announcement.contentAnnouncement text, plain text (HTML is escaped)
announcement.linkOptional link; external links open in a new tab
announcement.link_textLink text, defaults to "Learn more"

Behavior​

  • After a visitor clicks × to dismiss, the state is stored in their browser's localStorage — the banner won't show again on refresh or revisit
  • When the announcement content (or link) changes, its fingerprint changes and the banner automatically reappears for all visitors
  • No manual action needed — just edit the text

Notes​

  • The banner appears on all pages (home, posts, subpages, etc.)
  • It ships hidden and is revealed by JS, so visitors who dismissed it or have JS disabled never see a layout flash