punch icon indicating copy to clipboard operation
punch copied to clipboard

Search pages

Open herkyl opened this issue 11 years ago • 4 comments

I'm not sure how to approach this. I would like to add a searchbar to my site. Has anyone done this before?

herkyl avatar Jul 22 '13 12:07 herkyl

You can use an external service such as Google Custom Search - https://developers.google.com/custom-search/v1/overview

Also, it would be awesome if you can create a content plugin for Google Custom Search API ;)

laktek avatar Jul 22 '13 13:07 laktek

What about generating a JSON file with all page titles, is this possible? I would happily contribute to this. (I'm looking into Puntch as a possible framework for a website I need to make)

herkyl avatar Jul 22 '13 14:07 herkyl

Yes, It's possible. You may look at the https://github.com/laktek/punch-sitemap-generator for inspiration.

laktek avatar Jul 24 '13 00:07 laktek

@RobFox You can use lunr.js for the client-side part. There is a plugin for Jekyll you might look at for the generation stage: https://github.com/slashdotdash/jekyll-lunr-js-search

smola avatar Aug 03 '13 15:08 smola