User interface
Announcement banners, search behavior, and the back-to-top button.
Announcements
announcement shows a dismissible-looking banner above the navbar. Two modes, chosen automatically by the value:
[params]
# Static: rendered as-is (raw HTML allowed)
announcement = "See what's new in <a href=\"/blog/\">the changelog</a>."
# Remote: any value starting with "http" is treated as a URL to fetch
# the banner's HTML content from at runtime instead
announcement = 'https://example.com/announcement.html'Leave it unset (the default) to disable the banner entirely.
Back to top
[params]
back_to_top_button = trueShows a floating button that scrolls back to the top of the page once you’ve scrolled down. Set to false to remove it.
Search
Search is powered by Fuse.js
against a build-time JSON index (layouts/index.json), fetched client-side — not a Sphinx-style server-generated searchindex.js.
Required consumer-site setup: the index is only built when the home page’s JSON output format is enabled. Add this to your site’s hugo.toml (most starter configs don’t enable it by default):
[outputs]
home = ['HTML', 'RSS', 'JSON']
section = ['HTML', 'RSS']
page = ['HTML']Without this, index.json is never generated and the search box silently returns nothing — there’s no visible error, just no results.