Auto-focus Algolia search box on page load when there's a query parameter #13123
jimjam-slam
started this conversation in
Feature Requests
Replies: 1 comment 6 replies
-
It's likely a missing configuration https://www.algolia.com/doc/ Probable: |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I love Quarto's built-in search, but one thing I thought it was missing was the ability to operate it externally. For example, many browsers have a custom search engine feature whereby you can save
example.com/search?q=%s
and then use some hotword to trigger filling a query into that URL template.I started whipping up a small extension to rectify that — not a full-featured search route, just a JS filter to patch the URL query parameter over to the existing Algolia search box.
However, having a look at the Quarto source, I realised that Quarto (or autocomplete) already populates the search box if there's a
q
parameter. In fact, all that's left to do is click the search button (if the textbox is hidden by configuration or page size) and then focus the text box!Before I put this (now extremely small 😆) extension out there, I just wanted to check that this last piece of functionality wasn't already built into Quarto. I can't find any mention of it in the docs — was there an intention to allow the search box to be pre-filled on page load?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions