Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Can I pre-populate search via the URL? #117

Open
karlhinze opened this issue Feb 6, 2018 · 1 comment
Open

Can I pre-populate search via the URL? #117

karlhinze opened this issue Feb 6, 2018 · 1 comment

Comments

@karlhinze
Copy link

(Loving this theme, folks! Thank you.)

I have a use case where previously we were linking to "mydocs.com?q=search term" to drive users to search, and I'd like to duplicate that feature here. I've gotten so far as translating "myhexodocs.com#search=search term" to pluck out "search term" and enter it into the search box, but I'm having trouble using JS/jQuery to trigger the keyup and run the search.

Is there a better way of doing this, do you know? Is there some JS function that I can trigger to just say "search for X" or even to just run the search after I've pre-populated the search bar?

@rbarilani
Copy link
Contributor

@karlhinze Thanks. Will be a nice feature to introduce.
No there isn't a way to do that programmatically, the feature must be implemented in the core code-base first.
We will consider to introduce this feature in the next milestone, I will let you know.

Cheers.

@rbarilani rbarilani self-assigned this Feb 15, 2018
@rbarilani rbarilani added this to the 1.2.0 milestone Feb 15, 2018
@rbarilani rbarilani modified the milestones: 1.0.0-rc, 1.1.0 Mar 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants