Skip to main content

Search

The flexweg-search plugin adds client-side full-text search to your public site. No server, no third-party service — a JSON index is generated at publish time and a small runtime opens a search modal anywhere your theme exposes a trigger.

This page covers what visitors experience. For configuration, see the flexweg-search plugin reference.

What visitors see​

A search modal that opens on click of a search trigger or via a keyboard shortcut (default Cmd+K / Ctrl+K).

Visual:

┌────────────────────────────────────┐
│ 🔍 Search… [×] │
├────────────────────────────────────┤
│ MOST RECENT │
│ • Launch announcement │
│ News · Apr 15, 2026 │
│ • Q1 update │
│ News · Apr 02, 2026 │
└────────────────────────────────────┘

As the user types, results filter live (matched against the indexed fields — see plugin reference for what's indexed). Clicking a result navigates to the post.

How fast is it?​

Very. The full index is downloaded once on first modal open (typically 100 KB - 1 MB depending on site size and indexed fields). After that, all filtering happens in the browser — keystrokes feel instant.

For sites under ~5 000 posts, this is the right approach: no server, no monthly fees, simple to operate. Beyond that, consider Algolia or Meilisearch.

Where the search trigger lives​

Built-in themes wire it as follows:

ThemeTrigger locationHotkey
defaultTopbar (right side, magnifying glass icon)Cmd+K / Ctrl+K
magazineTopbar (after the menu)Cmd+K / Ctrl+K
corporateHeader overflow menuCmd+K / Ctrl+K

Custom themes need to expose a [data-cms-search] element (button, link, anything clickable). The runtime listens for clicks on the closest such element.

Index size implications​

The plugin lets you control what gets indexed (title-only, title + excerpt, or title + excerpt + body). Larger indexes mean richer results but heavier downloads on first modal open:

Setting1 000 posts5 000 posts
Title only~100 KB~500 KB
Title + excerpt~300 KB~1.5 MB
Title + excerpt + body~1.5 MB~7 MB

For mobile users on slow connections, the title + excerpt setting is usually the sweet spot. Body indexing is most useful for documentation sites where users search for specific phrases buried in long pages.

Search vs. archives vs. tags​

Three different ways to discover content — they're complementary:

  • Search — find posts by typing keywords. Best for "I half-remember the title."
  • Archives — browse by time period. Best for "I remember this was posted around March."
  • Categories / Tags — browse by topic. Best for "I want everything about X."

Most sites benefit from offering all three.

Hotkey conflicts​

Cmd+K is also the default for browser search bars in some Chromium variants. The plugin's hotkey only fires when no input/textarea is currently focused, so the conflict is rare in practice. If you need a different hotkey, change it in /settings/plugin/flexweg-search.

Privacy​

Search runs entirely in the visitor's browser. The plugin doesn't log queries, doesn't ping a server, doesn't include any analytics. The only network request is the initial index download (a single static file from your site's CDN).

If you need search analytics (popular queries, zero-result queries), you'd need to instrument the search runtime yourself — typically by sending events to your existing analytics provider.

Continue​