How to add search to static nuget feed
Last updated
Last updated
I have been using feeds for a while now. is totally awesome. One missing piece was search: searching a static feed would just return everything, always. !
To set it up:
Fork : this is the Azure function project that will perform the search on your static feeds. You'll host your own in a consumption (aka serverless) plan in Azure.
Create an Azure Functions app and follow the : that's basically setting up the simplest CI/CD for a GH repo.
By default, the project allows passing in the static feed "search" url (which is a blob named under /search/query
in your sleet blob container) and requires function authentication. In my case, I wanted a simpler search URL and anonymous access, so I . Basically the function can now be accessed at /query
, without URL-encoding another URL parameter there.
Follow instructions to .
That's it. Now you can configure my feed https://pkg.kzu.io/index.json and it will be fully searchable. Plus, I used to make the blob storage URL that much nicer. I even made the query URL nice, since it was trivial too: https://pkg.kzu.io/search 😍.