Skip to content

Add client-side search to the resolvable vocabulary site

Steve CAPELL requested to merge feat/vocab-search into main

A Nextra-style search box in the site header, built for a term dictionary and fully client-side so it works on the static S3/CloudFront deployment (no server, no framework).

  • build-vocab-site.py emits dist/search-index.json (one compact entry per class, property, code list and code value: name, kind, domain/scheme, url, definition snippet — ~8k entries, ~940 KB raw / much less gzipped), and injects a search box + styles into every page.
  • site/assets/search.js: a small dependency-free ranked search (name-weighted, definitions searched too, multi-word, keyboard nav) that lazy-loads the index on first keystroke and shows typed, badged results linking to each resource.

Deploys with dist/ and needs no CI change; the --delete sync keeps the index and script since they live under dist/.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Merge request reports

Loading