search
Supercharge your searching with a simple cloudflare worker.
Setup Guide:
Add https://search.alistair.sh/?q=
as a custom search engine to your browser. For Chrome/Chromium and Firefox/Waterfox, you would need to add %s
on the end of that. Consult your browser's documentation for relevant information.
Fallback Engines
If you prefer duckduckgo, you can set your URL to the following to have your searched routed through that instead:
https://search.alistair.sh/?q=%s&engine=https:%2f%2fduckduckgo.com%2f%3fq={q}
Usage Guide:
Using your browser as normal will funnel searches through to google's search engine (or a custom set one as shown in 'Fallback Engines').
To use the powerful part of this project and search through a variety of mainstream sites use the ![site] [search data]
structure to search any search data on any of the specific sites supported in this project.
Example: !yt cats
will search for cats on youtube :)
To see which sites are supported and what their shortcuts are check out /src/links.ts
.
Installation
Clone this repo into a directory of your choosing
$ git clone https://github.com/alii/search cloudflare-worker-search
Install the Cloudflare Wrangler CLI
Run
$ npm install -g wrangler
or install with yarn
$ yarn global add wrangler
Edit wrangler.toml to your liking
Set name
to what you want. By default this will be search.workeraccountname
.workers.dev but you can set a custom domain in the worker dashboard
Replace ad270f797e0a3205ac74136dc5b656b1
with your account ID. You can find this by logging into Cloudflare and copying the value after https://dash.cloudflare.com/
- for example the link https://dash.cloudflare.com/ad270f797e0a3205ac74136dc5b656b1
's account ID would be ad270f797e0a3205ac74136dc5b656b1
Publish the worker
$ wrangler publish src/index.ts
If it asks you You are about to publish a Workers Service that was last published via the Cloudflare Dashboard.
Enter y
The worker should now be working at the domain it gives you