원클릭으로
add-synonym
// Add search synonyms to the Algolia synonym list. Use when someone wants to add, update, or extend synonym groups for site search.
// Add search synonyms to the Algolia synonym list. Use when someone wants to add, update, or extend synonym groups for site search.
| name | add-synonym |
| description | Add search synonyms to the Algolia synonym list. Use when someone wants to add, update, or extend synonym groups for site search. |
| metadata | {"internal":true} |
Add or update synonym entries in site/search/synonymUtils.ts so that our Algolia-powered site search returns better results.
Start from a clean, up-to-date main branch and create a feature branch. Run:
git checkout master to switch to the main branch.git pull to get the latest changes.git stash is usually the right fix.git checkout -b add-synonym-<username>-<date> where <username> is the GitHub username and <date> is today's date as YYYYMMDD (e.g. add-synonym-bastianherre-20260413).Ask the user what synonyms they want to add. They can describe it in natural language (e.g. "add WHO as a synonym for World Health Organization" or "make 'EV' and 'electric vehicle' synonyms").
Read site/search/synonymUtils.ts to see the current synonym groups and section comments.
Determine which existing synonym group the new terms belong in:
Edit the file. Use double quotes for all strings. Keep entries in the same style as surrounding code.
Validate the change. Before running any commands, check that the environment is ready:
which yarn to check if Yarn is available.which node). If not, install it via brew install node (install Homebrew first via its install script if which brew fails).corepack enable && corepack prepare yarn@stable --activate. If corepack is not available, fall back to npm install -g yarn.yarn install to install project dependencies.node_modules doesn't exist, run yarn install first.yarn fixFormatChanged > /dev/null 2>&1 && yarn typecheck and fix any errors.yarn testLintChanged and fix any errors.yarn test run --reporter dot site/search/synonymUtils.test.ts and fix any errors.Pause and ask the user to confirm the changes look correct before proceeding. Show them what was added and wait for their go-ahead.
Commit to the feature branch with a message in this exact format:
✨🤖✨🤖 Add "WHO" synonym for "World Health Organization"Co-Authored-By: Claude <noreply@anthropic.com> as a trailer.Push the branch and create a PR:
git push -u origin HEAD.gh pr create --title "<same as commit message>" --body "" --reviewer edomt.countries utility and should NOT be added to this file. If the user asks for a country synonym, explain this and point them to the country data instead — unless it's a geographic term not covered by the countries list (like "gaza", "palestine" which are already in the file).baker/algolia/configureAlgolia.ts. No manual Algolia action is needed.