canjs / bit-docs-html-canjs

The plugins to produce CanJS.com
https://www.npmjs.com/package/bit-docs-html-canjs
MIT License
7 stars 0 forks source link

Redirect search queries with the “q” query parameter #567

Open chasenlehara opened 5 years ago

chasenlehara commented 5 years ago

Google Chrome makes it possible to add custom search engines. For example, I can add “mdn” as a keyword that searches https://mdn.io/%s (where %s is my search term), so I can type “mdn tab array” in Chrome and land on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array

As a user, I’d like the same functionality for CanJS. Landing on https://canjs.com/?q=stache should:

  1. Skip loading the homepage and instead load the first search result for stache, e.g. https://canjs.com/doc/can-stache.html
  2. Put the search term in the search bar but not give focus to the search bar