announcements

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 12 Imported by: 0

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

func New(cfg map[string]any, st *i18n.StringTable, langPtr *string) *plugin.Plugin

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL