-
Notifications
You must be signed in to change notification settings - Fork 169
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
[documentation] Add a nice search experience to the website #416
Conversation
This commit will add DocSearch to the documentation website. It is the first step in order to fully integrate it. Ref Bootstraping PR as jquery/api.jquery.com#1104
You can wait for our green light. We will do an internal check in order to provide you a final PR soon |
3ced3de
to
892ba08
Compare
This commit will enhance the includes by moving it to the end of the page
On desktop: Please review it :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few remarks, otherwise looks good.
One thing I couldn't comment inline - please don't add the .DS_Store
file to the repository.
themes/jquery/footer.php
Outdated
indexName: 'jquery', | ||
inputSelector: 'input[name=\'s\']', | ||
debug: true // Set debug to true if you want to inspect the dropdown | ||
})" async></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use tabs for indentation in this file, can you update it? Also, what's inside of the object should be indented more than the closing parens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! Done
themes/jquery/css/docsearch.css
Outdated
@@ -0,0 +1,16 @@ | |||
/* Custom DocSeach CSS to adapt the generic one * See https://community.algolia.com/docsearch/styling.html for more info */ | |||
nav#main .searchform { | |||
text-shadow: none; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use tabs, not spaces.
Thank you for the guidance @mgol. |
themes/jquery/css/docsearch.css
Outdated
@@ -0,0 +1,19 @@ | |||
/* Custom DocSeach CSS to adapt the generic one * See https://community.algolia.com/docsearch/styling.html for more info */ | |||
nav#main .searchform { | |||
text-shadow: none; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file still uses spaces, please change to tabs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad. fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks!
I've tested it now on https://api.jquery.com/ and it works absolutely awesome; such a nice experience. Wonderful work, thanks a lot! 👏 |
This commit adds DocSearch to the UI/Mobile/QUnit websites. It allows a user to have a learn-as-you-type experience by displaying results thanks to a dropdown in a live way. If there is no result, pressing enter will enable the legacy search. The commit also fixes the jQuery DocSearch handling to be skipped when the search input cannot be found. Ref #416 Closes #421
@s-pace Hi - is the API key added here part of an account we can access? The QUnit since has since switched to a static site where we push new content with a secret key during CI builds (ref qunitjs/qunit#1460). As I wasn't able to find which account this key belongs to (e.g. to login and generate a secret key), we opted to create an ad-hoc personal account for now and use. However, I'd rather this not depend on a personal account long-term. What do you recommend we do? |
👋 @Krinkle |
@s-pace I don't think we need/want analytics. I'm referring to the secret key used in jekyll-algolia to push new content after an update. This is currently set jquery/qunit's Jenkins job in a secret Would you recommend we just create another account like that, but with shared credentials stored in a safe place by OpenJS Foundation? Note that QUnit doesn't use docsearch.js, I don't know if what we use falls under "DocSearch", though. |
Thanks for the details. I thought that QUnit was still using DocSearch. I have disabled the daily crawl since this index is not used. The account you are referring to is tied to @trentmwillis account. I would definitely recommend you to create a shared account with shared credentials stored in a safe place by the OpenJS foundation. |
This PR will add DocSearch to the documentation website. It will allow an user to have a learn-as-you-type experience by displaying results thanks to a dropdown in a live way.
If there is no result, pressing enter will enable the legacy search.
Ref Bootstraping PR as jquery/api.jquery.com#1104