Commit 7d3ceba
feat: replace Elasticsearch search with Pagefind (#5106)
* feat: replace Elasticsearch search with Pagefind
Migrate documentation search from a self-hosted Elasticsearch index to
Pagefind, a static search library that crawls the built HTML in public/
and writes a chunked index into public/pagefind/. This removes the need
for an Elasticsearch server, local docker container, CORS workarounds,
and the ELASTICSEARCH_* CI secrets.
- package.json: drop @elastic/elasticsearch, cheerio, html-entities and
lodash; add pagefind dev dependency and a `pagefind` npm script
- site.yml / extensions.md: remove the generate-index.js Antora extension
- delete ext-antora/generate-index.js and es-docker-compose.yml
- ci.yml: drop ELASTICSEARCH_* env/secrets, run `npm run pagefind` after
the Antora build so the deployed site always ships a fresh index
- build-the-docs.md: rewrite the Search section for the Pagefind workflow
Verified locally: `npm run antora` builds cleanly with no reference to
the removed extension, and `npm run pagefind` indexes 1359 pages.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
* ci: fail build on empty Pagefind index; require pagefind >= 1.5.0
Address review feedback on the Elasticsearch -> Pagefind migration:
- CI ran `npm run pagefind` unconditionally. pagefind exits 0 even when it
indexes nothing (e.g. the output dir moves or no indexable pages are
emitted), so a broken index would deploy with silently empty search. Tee
the output and fail the build unless at least 10 pages were indexed.
- Bump the pagefind floor from ^1.3.0 to ^1.5.0. The docs-ui search markup
uses the Component UI web components (pagefind-modal, pagefind-modal-trigger),
which were introduced in Pagefind 1.5.0; ^1.3.0 declared compatibility with
releases that lack them. The lockfile already resolved 1.5.2, so this only
corrects the declared range (no dependency change).
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
---------
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 6ceaf02 commit 7d3ceba
8 files changed
Lines changed: 150 additions & 661 deletions
File tree
- .github/workflows
- docs
- ext-antora
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 35 | | |
42 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
| 395 | + | |
396 | 396 | | |
397 | | - | |
| 397 | + | |
398 | 398 | | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
| 399 | + | |
422 | 400 | | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | 401 | | |
434 | 402 | | |
435 | | - | |
436 | 403 | | |
437 | | - | |
| 404 | + | |
438 | 405 | | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
| 406 | + | |
444 | 407 | | |
445 | 408 | | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
459 | 412 | | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | 413 | | |
464 | 414 | | |
465 | 415 | | |
466 | | - | |
| 416 | + | |
467 | 417 | | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
| 418 | + | |
477 | 419 | | |
478 | 420 | | |
479 | 421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments