laktek / punch

A fun and easy way to build modern websites
http://laktek.github.com/punch
MIT License
1.17k stars 107 forks source link

Search pages #91

Open herkyl opened 11 years ago

herkyl commented 11 years ago

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

laktek commented 11 years ago

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 ;)

herkyl commented 11 years ago

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)

laktek commented 10 years ago

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

smola commented 10 years ago

@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