Plugins

First-class integrations for Eleventy, Astro, Docusaurus, MkDocs, and Hugo — each one runs the real crawler over your real build output.

Every plugin does the same three things at the end of your normal build: crawl the generated HTML into a static index, copy the search component assets next to it, and give you an idiomatic way to mount the search box. No build pipeline forks, no separate indexing service.

All of them also share two hooks:

// enrich.mjs — usable via any plugin option or `--enrich`
export const config = { vectors: [{ name: "embedding", path: "embedding", dims: 384 }] };
export default async docs => { /* add doc.embedding to each */ return docs; };

Eleventy

npm install eleventy-plugin-rangefind
// eleventy.config.js
import rangefind from "eleventy-plugin-rangefind";

export default function (eleventyConfig) {
  eleventyConfig.addPlugin(rangefind, {
    baseUrl: "/",            // prefix baked into result URLs
    src: "/rangefind/",      // where the index is served
    assetsBase: "/_rangefind"
  });
}
{% rangefindSearch placeholder="Search…", hotkey=true %}

The shortcode works in Nunjucks, Liquid, Markdown, Handlebars, and 11ty.js templates. This site is built with it.

Astro

npm install rangefind-astro
// astro.config.mjs
import { defineConfig } from "astro/config";
import rangefind from "rangefind-astro";

export default defineConfig({ integrations: [rangefind()] });
---
import RangefindSearch from "rangefind-astro/RangefindSearch.astro";
---

Docusaurus

npm install docusaurus-plugin-rangefind
// docusaurus.config.js
plugins: [["docusaurus-plugin-rangefind", { baseUrl: "/" }]]

Indexes the built docs site and injects the search widget — your docs search stays on your own hosting instead of a third-party service.

MkDocs

pip install mkdocs-rangefind
# mkdocs.yml
plugins:
  - rangefind

Runs after mkdocs build, indexes site/, and injects the widget into the theme. (Node ≥ 22 must be available on the build machine — the indexer is the rangefind CLI.)

Hugo

Hugo has no plugin system, so the integration is copy-in layouts/ partials plus one post-build command:

hugo && npx rangefind build ./public

See integrations/hugo/ in the repository for the partials and a verify script.

Everything else

If your tool produces HTML, the plain CLI is the integration:

npx rangefind build ./out --enrich ./enrich.mjs   # --enrich is optional

Add data-rangefind-* attributes to your templates for body scoping, facets, and metadata, then mount the component or call the query API yourself.