mistic100 / jekyll-bootstrap-doc

Simple documentation template for Github pages
http://mistic100.github.io/jekyll-bootstrap-doc
MIT License
89 stars 26 forks source link

Search #3

Open dovy opened 8 years ago

dovy commented 8 years ago

Any way we can add a logical search by generating a keywords json file or something?

mistic100 commented 8 years ago

Github Pages does not allow custom ruby plugins, so it's impossible to generate a search engine datasource unless loading all pages everytime in the browser, which I don't want.

I leave it open if this situation changes one day, I too would like this feature.

mistic100 commented 8 years ago

Solution 1 : use https://github.com/slashdotdash/jekyll-lunr-js-search locally and commit the generated files. I'm worried about locating the result in the page itself, for example if I search "Template" in QueryBuilder doc, it should propose http://querybuilder.js.org/#templates and not just http://querybuilder.js.org/. This can be very tricky to identify the relevant section.

Solution 2 : Google Custom Search (does not address anchors anyway)

XhmikosR commented 6 years ago

@dovy @mistic100: Something I have used in a few projects with success https://github.com/christian-fei/Simple-Jekyll-Search

It has some issues (see their issues), but can be extended to do many things, see https://github.com/christian-fei/Simple-Jekyll-Search/issues/82#issuecomment-328856889.