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 additional search providers #1416

Closed
2 of 4 tasks
mmistakes opened this issue Dec 22, 2017 · 11 comments
Closed
2 of 4 tasks

Add support for additional search providers #1416

mmistakes opened this issue Dec 22, 2017 · 11 comments

Comments

@mmistakes
Copy link
Owner

mmistakes commented Dec 22, 2017

Augment search feature by allowing support for different search providers, similar to what was done with commenting.

@mmistakes mmistakes changed the title Add support for jekyll-algolia Add support for additional search providers Dec 22, 2017
@nickgarlis
Copy link
Contributor

nickgarlis commented Dec 27, 2017

@mmistakes Would you also be interested in multiple language support ?

@mmistakes
Copy link
Owner Author

Not sure I follow what you mean by multiple language support @nickgarlis. Could you expand on it some?

@nickgarlis
Copy link
Contributor

nickgarlis commented Dec 27, 2017

@mmistakes I am not sure about Algolia but Lunr does not support any other languages other than English by default. Non English users might be interested in searching in their native language.

My solution to this was to use a different .js file for the extra language that I wanted to support where I registered a new stemmer.

We could also borrow some stemmers from this repository

@mmistakes
Copy link
Owner Author

Ah ok. Yeah I dunno. If it can be done in a way to not over complicate setup. In my experience it can be tricky handling multiple languages with a theme because Jekyll core isn’t really all that friendly to it.

Last thing I want to do is open a can of worms that can’t be supported well.

@mmistakes
Copy link
Owner Author

@nickgarlis Possible solution would be leverage site.locale set in _config.yml. This could be used to determine what language .js to load. Since locale can be language and locale (eg. en-US) doing something like this would normalize it to just the language.

{% assign lang = site.locale | slice: 0,2 | default: "en" %}

Then you could load the appropriate .js and if one doesn't exist for the given locale default to English.

<script src="{{ '/assets/js/lunr-{{ lang }}.js' | absolute_url }}"></script>

@nickgarlis
Copy link
Contributor

That's exactly how I was thinking of doing it !

@pixelastic
Copy link

For what it's worth, Algolia is language agnostic :)

Is there anything I could do to help you integrate jekyll-algolia?

@mmistakes
Copy link
Owner Author

@pixelastic It's on my todo list. I just need to lay the ground work for it in the theme.

@mmistakes
Copy link
Owner Author

Has a pull-request #1531

@user414
Copy link
Contributor

user414 commented May 7, 2018

First thanks for the great theme @mmistakes, very useful. Should we keep this request open since google CSE is still not supported or should we open a new one to keep track of it? We were also looking to support google CSE and came upon this issue.

@mmistakes
Copy link
Owner Author

@user414 Open a new issue so it can be tracked, if and when I get around to it.

kkunapuli pushed a commit to kkunapuli/kkunapuli.github.io that referenced this issue May 30, 2019
* Support Lunr and Algolia search providers
* Document search providers and configuration
* Update CHANGELOG and history

close mmistakes#1416
sumeetmondal pushed a commit to sumeetmondal/sumeetmondal.github.io that referenced this issue Sep 10, 2019
* Support Lunr and Algolia search providers
* Document search providers and configuration
* Update CHANGELOG and history

close mmistakes#1416
jchwenger pushed a commit to jchwenger/jchwenger.github.io that referenced this issue May 5, 2023
* Support Lunr and Algolia search providers
* Document search providers and configuration
* Update CHANGELOG and history

close mmistakes#1416
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

4 participants