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

Add support for Google Custom Search Engine #1652

Closed
user414 opened this issue May 7, 2018 · 7 comments
Closed

Add support for Google Custom Search Engine #1652

user414 opened this issue May 7, 2018 · 7 comments

Comments

@user414
Copy link
Contributor

user414 commented May 7, 2018

This is an extension to issue #1416 to implement
Google Custom Search Engine as a search provider.

user414 added a commit to user414/minimal-mistakes that referenced this issue May 11, 2018
…w we only support the look and feel "results only" and the engine must be set to use that layout. Add a google section to the search providers and search_form and search layout.
@user414
Copy link
Contributor Author

user414 commented May 11, 2018

Thanks to the great structure of your theme and the relative ease of the google custom search we did an implementation that we are going to deploy and thought to share it upstream. Please let me know if you would like to see any modification for the merge. Thanks again for the great theme.

@mmistakes
Copy link
Owner

Thanks @user414. I had a quick look over the PR and don't see any issues prior to me testing it.

Do you happen to have a working example of it pushed somewhere to see how everything looks on a deployed site?

@user414
Copy link
Contributor Author

user414 commented May 11, 2018

@mmistakes Unfortunately not yet.

@mmistakes
Copy link
Owner

OK. I did a quick test and things look mostly good.

Under the "Look and Feel" section of CSE, if you use the default Overlay layout things appear broken. Search results overlay has z-index issues, masthead and footer appear above it and cut into the results.

image

Full Width and Results Only layouts both look pretty good.

image

Not sure if it's worth worrying about the "Overlay" layout and just make mention in the config documentation to use Full width or Results only layouts.

@user414
Copy link
Contributor Author

user414 commented May 11, 2018

@mmistakes Ok good idea. I'm not sure how well Full Width would work since that is meant for a search box/search result combo box provided by Google and we use the result only model. We tried with using the Google provide search box but it just did not fit as well with the rest of the theme.

As far as the comments did you mean adding it to the _config.yml, or in the proper documentation somewhere in doc like 05-configuration.md, or both?

As a side note while there was some instruction on how to restyle the results, as we thought the regular green/blue might be to big of a clash with the gray theme, we thought that when using the google minimalist look and feel theme in the CSE options it matches pretty well the color scheme and saw no need to import all the google style class inside.

@mmistakes
Copy link
Owner

I meant in the documentation...I can take care of that.

Full width works fine as does "results only". To my eye they look identical. I didn't try all of the look and feel layouts, but the one that definitely looks broken is "overlay".

image

I'm fine with leaving the styling alone as it seems all of that can be configured in CSE's look and feel section. This is my first experience using CSE on a site so not really sure what people expect from it. That was part of the reason I was dragging my feet adding the feature.

Adding something I don't use personally causes a clash when I start getting support requests about it.

@user414
Copy link
Contributor Author

user414 commented May 14, 2018

Adding something I don't use personally causes a clash when I start getting support requests about it.

I can definitely understand that, feel free to leave it as a PR if you think it's going to create support headache down the line. Anyway, it's fairly easy if someone just want to copy paste they can just hard code their engine id and put everything in search_form.html to minimize the update maintenance.

As a side note re-looking at the code I forgot to either namespace the javascript or change it to a less generic function name like googleCustomSearchExecute() instead of executeQuery() which could collide down the road with something else.

luispuerto referenced this issue in luispuerto/luispuerto-net Jun 27, 2018
Implement feature #1652 google custom search support. For now we only support the look and feel "results only" and the engine must be set to use that layout. Add a google section to the search providers and search_form and search layout.

Close #1652
kkunapuli pushed a commit to kkunapuli/kkunapuli.github.io that referenced this issue May 30, 2019
…akes#1667)

Implement feature mmistakes#1652 google custom search support. For now we only support the look and feel "results only" and the engine must be set to use that layout. Add a google section to the search providers and search_form and search layout.

Close mmistakes#1652
sumeetmondal pushed a commit to sumeetmondal/sumeetmondal.github.io that referenced this issue Sep 10, 2019
…akes#1667)

Implement feature mmistakes#1652 google custom search support. For now we only support the look and feel "results only" and the engine must be set to use that layout. Add a google section to the search providers and search_form and search layout.

Close mmistakes#1652
jchwenger pushed a commit to jchwenger/jchwenger.github.io that referenced this issue May 5, 2023
…akes#1667)

Implement feature mmistakes#1652 google custom search support. For now we only support the look and feel "results only" and the engine must be set to use that layout. Add a google section to the search providers and search_form and search layout.

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

No branches or pull requests

2 participants