mdn.io icon indicating copy to clipboard operation
mdn.io copied to clipboard

Index page and OpenSearch support

Open amsam0 opened this issue 2 years ago • 0 comments

Here's a very basic index page, with support for OpenSearch. However, I think there are a few things that need to be done before merging:

  • Have a public directory and serve those files directly, instead of storing them all in a javascript object. I would have done this to start off with but I wasn't sure how Cloudflare Workers would behave or if it would allow that. We could maybe setup something with Webpack for this to include the files in the bundle.
  • Remove repetition between the node.js server and worker code. The only difference between them is that servie uses statusCode and workers uses status.
  • Properly test the worker code. I've only tested the node.js server.
  • Improve the index page. It's not exactly very pretty right now and is in need of some major improvements. In addition, I wasn't sure how chromium based browsers handle OpenSearch, and they don't seem to have an article on it like Firefox does. It also doesn't have a favicon, but we could just use https://developer.mozilla.org/favicon.ico like the OpenSearch xml uses.
  • Configuration for the index page, mainly for other people hosting their own instance.

amsam0 avatar Oct 01 '22 16:10 amsam0