Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cmd + K keyboard shortcut #973

Closed
swyxio opened this issue Aug 22, 2020 · 9 comments
Closed

Cmd + K keyboard shortcut #973

swyxio opened this issue Aug 22, 2020 · 9 comments

Comments

@swyxio
Copy link
Contributor

swyxio commented Aug 22, 2020

What is the current behavior?

i noticed you have this nice Cmd + K keyboard shortcut on your docs site
image

i would really like to have that for mine. however i searched the site codebase and couldnt find it. could you give any hints on how to do this?

@francoischalifour
Copy link
Member

Hey, the DocSearch version you're referring to is on my personal repository francoischalifour/autocomplete.js. We plan to migrate it to algolia/docsearch in the coming days.

You can integrate it to your website using the DocSearch component. If you want to leverage lazy loading, you'll be interested in DocSearchButton and DocSearchModal (see Docusaurus example).

Let us know once your new search is live 🙂

@kamranayub
Copy link

@francoischalifour Thanks, WIP integration for excalibur.js is in this PR: excaliburjs/excaliburjs.github.io#56

@francoischalifour
Copy link
Member

That's great @kamranayub! Make sure to upgrade to @docsearch/react's latest alpha tag (as of today, 1.0.0-alpha.28) to get the latest fixes and features.

The docs look really well detailed and exhaustive, that's impressive.

@kamranayub
Copy link

That's great @kamranayub! Make sure to upgrade to @docsearch/react's latest alpha tag (as of today, 1.0.0-alpha.28) to get the latest fixes and features.

The docs look really well detailed and exhaustive, that's impressive.

Thanks! Right now I think I'm just running into an issue with the typing not showing up in the modal? I had to leave it this morning so I haven't debugged it.

@Shipow
Copy link
Contributor

Shipow commented Oct 26, 2020

Hi @kamranayub, since your are using the V3 we need to adjust the configuration file accordingly. cc @shortcuts

@shortcuts
Copy link
Member

Hi @kamranayub, I've updated your config with better selectors to match the v3 display. It should be effective after the next crawl, feel free to @ me if you want to change something/open a PR.

@oliviertassinari
Copy link
Contributor

oliviertassinari commented Dec 1, 2020

Is there a motivation for using CTRL +K over another shortcut?

I thought that / was a convention for searching, e.g. ux.stackexchange, Youtube Music, Google Calendar, Gmail.

@francoischalifour
Copy link
Member

@oliviertassinari There's a whole thread about the Ctrl+K in the original Docusaurus PR. Note that / is also supported, although not displayed in the search button.

@oliviertassinari
Copy link
Contributor

Great, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants