Lightning-fast, typo-tolerant search for EmDash
Fuzzy search that finds the right page as people type. It runs on your own site, so your content and their searches never go to an outside service.
Free and MIT licensed
The live search did not load. Its recorded answer to “crampns”: Microspikes, crampons or snowshoes?
Fuzzy search that forgives typos
The same searches, in EmDash’s own search and in this one. Here, both find the one that is spelled right, even half typed. Only this one finds the ones with a typo.
typo
Search: crampns
- EmDash’s own search
- No results
- Astronomic Search
Microspikes, crampons or snowshoes?
Microspikes for a packed trail, crampons for steep ice, snowshoes for fresh powder.
Journal1 of 5 results
typo
Search: zippr
- EmDash’s own search
- No results
- Astronomic Search
Fix a stuck or split zipper
Most zipper problems are the slider, not the teeth.
Guides1 of 3 results
typo, several words
Search: trial shoes
- EmDash’s own search
- No results
- Astronomic Search
Trail shoes vs. hiking boots: which to pack this summer
Lighter feet or more ankle support? How our staff decide between trail runners and boots for day hikes in the Rockies.
Journal1 of 8 results
last word half typed
Search: avalanche gea
- EmDash’s own search
Avalanche rescue gear basics
Beacon, shovel, probe, and a course before you need them.
Guides1 result
- Astronomic Search
Avalanche rescue gear basics
Beacon, shovel, probe, and a course before you need them.
Guides1 result
Recorded on Nov 25, 2026 with a sample site’s content. EmDash 1.4.0: the built site’s search page and its live search endpoint. EmDash 1.6.0: its search function, called directly on the same content. For these words, every EmDash run gave the same results. Astronomic Search 0.2.0: its dialog on the built site, with default settings. Each answer is the first result, drawn the same way for both, with the words that matched marked.
Instant search that manages itself
It builds the index from your content and keeps it current, so you add it once.
Private by design
Searches run in the visitor’s browser, on files your site serves. Your content and their searches go to no outside service. No account, no API key, no monthly fee.
Styled like your site
Set the color, the font and the corners in CSS. Show it light, dark or in each visitor’s own setting.
Fresh when you publish
Publish, edit or delete, and search has the change in about a minute. It also rebuilds every night.
A full results page
Every match on one page, with an address you can share. Without JavaScript, your theme’s own results show.
Keyboard and phone
Open search with ⌘ K, Ctrl K or /, or pick your own keys in the admin. Arrow keys, Enter and Esc all work. On a phone, the dialog fills the screen.
Small until it’s needed
Each page loads one small script. The dialog and the index load when a visitor first reaches for search.
The script on every page is at most 6.29 KB (gzip). The dialog is at most 26.58 KB and loads on first use, with the index. Every release is checked against these sizes. How search loads and what it weighs.
Works with your theme, managed from the admin
Keep the theme’s search box, or place search yourself. Takeover is off until you turn it on, and placements work either way.
- Take over the search box
- One switch in the admin. The theme’s search form, or EmDash’s LiveSearch box, then opens this search, with any text already typed. Most forms need no change.
- Or place it yourself
- Wrap a search link or search form in a placement, and search opens from there. A link can look like a button. It works with takeover on or off.
- Shortcut keys
- Open search from any page. Pick your own keys in the admin. With takeover on, they win over the theme’s.⌘ K, Ctrl K or /
- Settings
- Keys, takeover, the search box text, light or dark, and the results page. Save, and the next page view has them.


Install in three steps
The first index builds by itself, within a minute of install. On Cloudflare, that needs EmDash’s Worker entry and a one-minute Cron Trigger. Drafts, scheduled entries and “noindex” entries stay out.
Install the package
One package from npm. It is the same one that runs search on plain Astro sites.
pnpm add @astronomic-dev/searchAdd the plugin
Two lines in your config. It indexes every public collection that has search turned on in EmDash. Then press ⌘ K, Ctrl K or / on any public page.
// astro.config.mjs import { defineConfig } from "astro/config"; import emdash from "emdash/astro"; import { search } from "@astronomic-dev/search/emdash"; import { searchFiles } from "@astronomic-dev/search/emdash/astro"; export default defineConfig({ integrations: [ emdash({ // ...your database and storage plugins: [search()], }), searchFiles(), ], });Use it on the theme’s search page
The results page takes your theme’s fonts and text color.
The full install guide--- import SearchResults from "@astronomic-dev/search/emdash/astro/SearchResults.astro"; const query = Astro.url.searchParams.get("q")?.trim() || ""; --- <SearchResults query={query}> <!-- The theme's own search form and results, for no JavaScript --> </SearchResults>
Good to know
The facts to check before you add it.
- Price
- Free, under the MIT license.
- EmDash versions
- Tested up to EmDash 1.6, including the default blog template. Install it from npm. It is not in EmDash’s plugin registry.
- Hosting
- On Cloudflare, it needs the Workers Paid plan. Node hosting has no such limit.
- Word forms
- It matches spelling, not grammar. “repairing” does not find “repair”. EmDash’s own search does find it.
- Pages only
- A result opens the page, not a heading inside it. Visitors can narrow results by type. There are no other filters yet.
- Site size
- Made for sites of up to about 5,000 pages.
Add it to your EmDash site
One package, a few lines of config, and search is on every page.
pnpm add @astronomic-dev/searchOn plain Astro? The same package has an Astro integration.
