Skip to content

Wire local search via @easyops-cn/docusaurus-search-local (#193 of Fallout)#4

Merged
ChrisonSimtian merged 1 commit into
mainfrom
feat/193-local-search
May 26, 2026
Merged

Wire local search via @easyops-cn/docusaurus-search-local (#193 of Fallout)#4
ChrisonSimtian merged 1 commit into
mainfrom
feat/193-local-search

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Summary

Closes ChrisonSimtian/Fallout#193 — adds in-bundle search to https://docs.fallout.build/. The index is generated at build time and shipped with the static assets; no external service involved.

Why this plugin / why this version

  • Plugin: `@easyops-cn/docusaurus-search-local` is the standard self-contained search add-on for Docusaurus.
  • Pinned to 0.54.1, not 0.55.x. The 0.55 line introduced `open-ask-ai` (an AI Q&A widget) as a hard peer dependency. We don't want that feature, and we don't want that extra runtime dependency on the docs site. 0.54.1 is the last release before that change, supports Docusaurus 3 + React 19, and is otherwise feature-complete for our needs. If we ever want the AI widget we can upgrade and install `open-ask-ai` deliberately.

Config choices

  • `hashed: true` — content-hashed index filenames so CDN/Pages caching invalidates correctly when content changes.
  • `indexBlog: false` — `blog: false` in the classic preset; without this the plugin warns.
  • `docsDir: 'fallout-source/docs'` — markdown source lives in the sibling Fallout repo, checked out into `./fallout-source/` at build time (matches the existing `docs` preset `path: './fallout-source/docs'`). Without this, the plugin warns that the default `./docs` doesn't exist.
  • `highlightSearchTermsOnTargetPage: true` + `explicitSearchResultPath: true` — small UX wins on the search results page and after landing on a hit.

Verification

  • Local `npm run build` cannot complete on this machine due to a pre-existing Node 26 SSR issue affecting `main` already (see PR Fix broken-link warnings; enforce broken-link checks (#192 of Fallout) #2's notes). But the plugin loads cleanly — no config-time errors, and the previous `docsDir doesn't exist` warning is gone after pointing it at the right path.
  • Real validation happens on CI here (Node 22) post-merge. If the build succeeds, the next deploy of docs.fallout.build will ship the search box in the navbar.

What this PR does NOT do

  • No styling changes to the search box (default Docusaurus styling is fine).
  • No keyboard-shortcut customisation (defaults to `/` to focus search).
  • No tuning of result limits or snippet length.

If any of those want polish after we see the deployed UX, that's follow-up.

Refs

  • Closes ChrisonSimtian/Fallout#193 (one of three follow-ups from the closed parent #41).
  • Sibling PRs already merged: ChrisonSimtian/Fallout#194 (README link), ChrisonSimtian/Fallout#195 + Falloutdocs#2 (broken-link cleanup).

…llout)

Adds in-bundle, build-time search to docs.fallout.build. The index is
generated at build time and shipped with the static site — no external
service.

Pinned to 0.54.1 deliberately. The 0.55.x line added `open-ask-ai`
(an AI Q&A widget) as a hard peer dependency; we don't want that
feature or that runtime dependency on the docs site. 0.54.1 is the
last release before that change and supports Docusaurus 3 + React 19.

Config notes:
  - hashed:true — content-hashed index filenames so CDN/Pages caching
    invalidates correctly when content changes.
  - indexBlog:false — Falloutdocs has no blog (blog:false in classic
    preset); without this the plugin warns.
  - docsDir:'fallout-source/docs' — markdown source lives in the
    sibling Fallout repo, checked out into ./fallout-source/ at build
    time (matches the existing docs preset's path:'./fallout-source/docs').
  - highlightSearchTermsOnTargetPage:true and explicitSearchResultPath
    — small UX wins on the search-results page and on landed pages.
@ChrisonSimtian
ChrisonSimtian merged commit c803a1f into main May 26, 2026
@ChrisonSimtian
ChrisonSimtian deleted the feat/193-local-search branch May 26, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wire local search for docs.fallout.build

1 participant