Skip to content

Build a search index so one box searches the whole site #55

Description

@pushpam2404

Context

There are now three separate searches — contributors, glossary, and soon the FAQ — and none of them searches the prose on the Git basics or PR checklist pages. Somebody looking for "merge conflict" has to guess which page and which box.

What to change

Files: A new build script, a new data file, a new script, all seven pages

Requirements:

  • Generate a search index at build time from the page content, not at runtime
  • A GitHub Action rebuilds it when content changes, in the style of build-contributors.yml
  • One search entry point that returns results across pages, with the page name shown
  • Keep the index small enough to load on a phone on campus wifi — state the size in the pull request
  • No search library unless you can justify the weight; the site has no build step and that is a feature
  • Must degrade sensibly with JavaScript off

Acceptance criteria

  • Searching finds content from every page, not only structured data
  • Results say which page they are on and link to the right place
  • The index is generated, never hand-edited, and CI keeps it current
  • Index size is stated and justified
  • The page is usable without JavaScript

How to verify locally

python3 -m http.server 8000

Then open http://localhost:8000.

Difficulty

Advanced. Design the approach and say why before writing much code — comment on the issue first and a maintainer will talk it through with you.


New here? Comment /claim on this issue and a bot will assign it to you. Then read CONTRIBUTING.md.

Stuck at any point? Comment here saying what you have tried and where it stopped working — that is not an admission of failure, it is how we find out the instructions were unclear. You can also come to a PR Debug Clinic (Oct 12 or Oct 21).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions