Documentation
¶
Overview ¶
Package announcements provides a built-in plugin that renders dismissible announcement banners. The default theme places them in a one-line strip above the site header. Supports multiple announcements with i18n, three display modes (stack/first/rotate), date scheduling, and page targeting.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New constructs the announcements plugin from its config map, StringTable, and a pointer to the current language (captured by closure, resolved at render time). st and langPtr may be nil — the plugin degrades to raw message keys.
func NewWithStrings ¶ added in v1.6.0
func NewWithStrings(cfg map[string]any, strs func() *i18n.StringTable, langPtr *string) *plugin.Plugin
NewWithStrings is New with the string table read at render time: a builder reused across dev rebuilds loads the strings again on every build, and the plugin, registered once, must render the latest ones.
Types ¶
This section is empty.