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

added search bar to docusarurus #12

Merged
merged 3 commits into from Oct 23, 2023
Merged

Conversation

SethY8s
Copy link
Contributor

@SethY8s SethY8s commented Oct 18, 2023

Added the bare minimum for a search bar with Docusaurus. Please note that I did not add the Algolia API keys, so the search bar and modal will not function properly.

Screenshot 2023-10-19 at 12 06 44 AM

Algolia provides free search API keys for documentation. You can learn more about the program here https://docsearch.algolia.com/apply/.

Also here is the Docusaurus link for how I set the search bar up.

https://docusaurus.io/docs/search#using-algolia-docsearch

Please critique the PR all you want, and I would be more than willing to get the API keys if allowed. Thanks

docusaurus.config.js Outdated Show resolved Hide resolved
docusaurus.config.js Outdated Show resolved Hide resolved
docusaurus.config.js Outdated Show resolved Hide resolved
Co-authored-by: Dariia Porechna <35382599+dariolina@users.noreply.github.com>
@dariolina
Copy link
Member

I have noticed the actual search bar is missing from navbar . This info should be sufficient to make it appear on the page https://docusaurus.io/docs/api/themes/configuration#navbar-search

@SethY8s
Copy link
Contributor Author

SethY8s commented Oct 23, 2023

I have noticed the actual search bar is missing from navbar . This info should be sufficient to make it appear on the page https://docusaurus.io/docs/api/themes/configuration#navbar-search

@dariolina Are you running the code locally or trying to deploy it to some sort of test build? On my screen it shows up perfectly fine, however, I am just running it on a local host and not trying to build it to production or other machine.

Screenshot 2023-10-23 at 6 06 40 PM

I will still add the code you shared, just to make sure, but I am still curious about what might be going on. Thanks

Edit:

I just added it to the navbar and seems to be working well. You can adjust where you would like to place it by adjusting the index of the items array, 0 being the most left and items.length being all the way to the right. However after the change, the search bar is to the left of the night/day-mode switch.

Screenshot 2023-10-23 at 6 21 05 PM

@dariolina
Copy link
Member

Hmm, it didn't show up before. Now it does regardless of being present in navbar. Also the background is a bit too purple to my taste. Let's merge it as is and I will play around with positions and theme some other time. Thank you a lot for your contribution!

@dariolina dariolina merged commit 0c9162c into subspace:main Oct 23, 2023
1 check passed
@dariolina dariolina mentioned this pull request Oct 23, 2023
@ryyeung
Copy link

ryyeung commented Nov 15, 2023

Hi @SethY8s, thank you for this contribution. You won the $500 prize for best documentation contribution of the month. Could I please get your Discord and an email to send a winner's form to?

Please see the post below for more details.
https://forum.subspace.network/t/docs-contest-enhance-our-documentation-and-win-500/1523/5

@SethY8s
Copy link
Contributor Author

SethY8s commented Nov 15, 2023

@ryyeung Hey Ryan, well that was a very nice surprise! My discord is:

seth8656#6240

and my email is:

seth8656@gmail.com

Just to let you know I am actively being interviewed at Subspace, and if you would like to choose another candidate that is not being interviewed, feel free to! I really had no intention of getting a reward. Thanks Ryan!

@ryyeung
Copy link

ryyeung commented Nov 15, 2023

@SethY8s Great to hear that! We decided to stick to our word, you had an amazing contribution. Please check your email for the form that I will send.

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

Successfully merging this pull request may close these issues.

None yet

3 participants