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
mmistakes opened this Issue Dec 22, 2017 · 11 comments

Comments

Projects
None yet
4 participants
@mmistakes
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 from Add support for jekyll-algolia to Add support for additional search providers Dec 22, 2017

@nickgarlis

This comment has been minimized.

Contributor

nickgarlis commented Dec 27, 2017

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

@mmistakes

This comment has been minimized.

Owner

mmistakes commented Dec 27, 2017

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

@nickgarlis

This comment has been minimized.

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

This comment has been minimized.

Owner

mmistakes commented Dec 27, 2017

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

This comment has been minimized.

Owner

mmistakes commented Dec 28, 2017

@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

This comment has been minimized.

Contributor

nickgarlis commented Dec 28, 2017

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

@pixelastic

This comment has been minimized.

pixelastic commented Feb 1, 2018

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

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

@mmistakes

This comment has been minimized.

Owner

mmistakes commented Feb 1, 2018

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

@mmistakes

This comment has been minimized.

Owner

mmistakes commented Feb 16, 2018

Has a pull-request #1531

@mmistakes mmistakes referenced this issue Feb 16, 2018

Merged

Add Algolia search provider #1531

4 of 4 tasks complete

@mmistakes mmistakes closed this in acdd344 Feb 16, 2018

@user414

This comment has been minimized.

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

This comment has been minimized.

Owner

mmistakes commented May 7, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment