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

Search on site #202

Open
divush opened this issue Jul 16, 2017 · 1 comment
Open

Search on site #202

divush opened this issue Jul 16, 2017 · 1 comment

Comments

@divush
Copy link

divush commented Jul 16, 2017

Typical blog site will have a lot of posts. I was wondering if it is possible to implement a search algorithm that allows the user to search for topics. I have already implemented a tagging system, but what if people want to search for a particular word or phrase, which is not a tag. Can this even be implemented in a static site?

@pixelastic
Copy link

Hello @divush.

I'm the author of the jekyll-algolia plugin that does exactly what you're suggesting: adding search to a Jekyll website. It works by extracting all content from the posts/pages and pushing them to the Algolia API. You then trigger a search from the front-end by directly calling the Algolia API in JavaScript. You can check a live demo here if you're interested.

As a matter of fact, I'd be happy to submit a PR to add this plugin to the theme if the maintainers think it's worth it. Another theme (Minimal Mistakes) already implemented it (with a fallback to Lunr.js in case you don't want to use Algolia).

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

No branches or pull requests

2 participants