Skip to content

feat: add OpenSearch support#113

Merged
danielroe merged 3 commits intonpmx-dev:mainfrom
BYK:feat/opensearch-support
Jan 26, 2026
Merged

feat: add OpenSearch support#113
danielroe merged 3 commits intonpmx-dev:mainfrom
BYK:feat/opensearch-support

Conversation

@BYK
Copy link
Copy Markdown
Contributor

@BYK BYK commented Jan 26, 2026

Summary

Add OpenSearch support so browsers can use npmx.dev as a search engine directly from the address bar.

Changes

  • public/opensearch.xml - OpenSearch description file with search URL template and suggestions endpoint
  • nuxt.config.ts - Autodiscovery <link> tag in HTML head
  • server/api/opensearch/suggestions.get.ts - Search suggestions API for browser autocomplete (proxies npm registry search, cached for 60s)

How to Test

  1. Visit https://npmx.dev/opensearch.xml to verify the XML
  2. Test suggestions: https://npmx.dev/api/opensearch/suggestions?q=react
  3. Firefox: Visit site → click address bar → add "npm" search engine
  4. Chrome: Settings → Search engines → "Site search" should list npmx.dev

Add OpenSearch support so browsers can use npmx.dev as a search engine.

- Add OpenSearch description XML file at /public/opensearch.xml
- Add autodiscovery link tag to HTML head
- Add search suggestions API endpoint for browser autocomplete
@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 26, 2026

@BYK is attempting to deploy a commit to the danielroe Team on Vercel.

A member of the Team first needs to authorize it.

@BYK BYK marked this pull request as ready for review January 26, 2026 10:03
@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
npmx.dev Ready Ready Preview, Comment Jan 26, 2026 10:31am

Request Review

Copy link
Copy Markdown
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing idea!

@BYK
Copy link
Copy Markdown
Contributor Author

BYK commented Jan 26, 2026

amazing idea!

Def not amazing as this repo. Thanks so much for that! :)

@danielroe danielroe merged commit 49cff3b into npmx-dev:main Jan 26, 2026
8 checks passed
@BYK BYK deleted the feat/opensearch-support branch January 26, 2026 10:36
vinnymac pushed a commit to vinnymac/npmx.dev that referenced this pull request Jan 28, 2026
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.

2 participants