A Hugo module that adds Kagi Small Web membership badge and webring navigation to your Hugo site.
Provides three partials:
- badge — official Kagi Small Web animated seal (88×31 GIF), links to kagi.com/smallweb
- webring-bar — prev/next navigation bar built from
smallweb.txtat build time - styles — CSS for the webring bar; call from your
<head>
- Hugo 0.141.0 or later (uses
resources.GetRemotewithtryerror handling) - Your site's RSS feed must be listed in kagisearch/smallweb
Add to your hugo.toml / config.toml:
[params.kagiSmallWeb]
enabled = true
feedUrl = "https://your-site.com/index.xml" # must match smallweb.txt exactly
badgeVariant = 1 # 1 (default) or 2
[[module.imports]]
path = "github.com/jt55401/hugo-kagi-smallweb"Then run:
hugo mod get github.com/jt55401/hugo-kagi-smallweb{{ partial "kagi-smallweb/styles.html" . }}Add to any layout where you want the animated seal to appear:
{{ partial "kagi-smallweb/badge.html" . }}Add to any layout where you want the prev/next navigation:
{{ partial "kagi-smallweb/webring-bar.html" . }}Styles in <head> — add to layouts/partials/head/extensions.html:
{{ partial "kagi-smallweb/styles.html" . }}Badge on home page — add to layouts/partials/home/extensions.html:
{{ partial "kagi-smallweb/badge.html" . }}Webring bar in footer — create layouts/_partials/footer.html to override the theme footer. Copy the theme's footer content verbatim, then append:
{{ partial "kagi-smallweb/webring-bar.html" . }}| Key | Type | Default | Description |
|---|---|---|---|
kagiSmallWeb.enabled |
bool | false | Enable the module. Both partials render nothing unless true. |
kagiSmallWeb.feedUrl |
string | — | Your RSS feed URL, exactly as it appears in smallweb.txt. |
kagiSmallWeb.badgeVariant |
int | 1 | Badge variant: 1 or 2. Falls back to 1 if absent or invalid. |
Note: Hugo normalizes all
paramskeys to lowercase internally. The keys above are shown in their TOML/config form (feedUrl,kagiSmallWeb); in template code they appear asfeedurlandkagismallweb. This is handled automatically — you do not need to change your config.
By default the module fetches smallweb.txt from GitHub over HTTP at build time. To avoid the HTTP call and cache the list in git instead:
-
Add
kagisearch/smallwebas a git submodule in your site'sassets/directory:git submodule add --depth=1 https://github.com/kagisearch/smallweb.git assets/kagi-smallweb
-
Set
smallwebTxtPathin your config:[params.kagiSmallWeb] smallwebTxtPath = "kagi-smallweb/smallweb.txt"
-
To update the cached list:
git submodule update --remote assets/kagi-smallweb git add assets/kagi-smallweb git commit -m "chore: update smallweb list"
When smallwebTxtPath is set, no HTTP requests are made during hugo build.
The smallweb.txt list is cached by Hugo at build time based on HTTP cache headers. To force a fresh fetch:
hugo --ignoreCache- Variant 1 (default): animated blue badge
- Variant 2: animated alternate design
Both are official Kagi Small Web Seal images served from Kagi's servers.
- "Browse" links to
kagi.com/smallweb(no dedicated random-entry endpoint exists) - If your
feedUrlis not found insmallweb.txt, a build warning is emitted and the bar is hidden - If the list fetch fails, the bar is hidden and a build warning is emitted; the badge is unaffected
- The webring bar renders nothing until your feed URL appears in the live
smallweb.txt