Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
added search to site via
lunr.js
, a lightweight search engine.because GitHub pages don't allow any plugins, all search needs to be done client-side.
the search form downloads the compiled search index in file
searchIdx.json
.this file is essentially a lookup table from keywords to the documents in which they occur.
the directory
_tools
contains scripts used to build and test this index. the compiled index has been checked into the set of jekyll source files, again because GitHub doesn't allow jekyll plugins for site generation.the index is compiled from generated file
_site/docsArray.json
. pre-compiling this index speeds up search. the top-level filedocsArray.json
contains the logic which determines which pages to index. all documentation and interface pages are indexed; the rest of the site isn't - this provides the cleanest set of search results.in order to index the html pages in the case-studies directory I had to add yaml headers to each file.
in order to get search working I had to remove some javascript libraries which were throwing errors. I tried to get rid of some fancy effects from the
so-simple-theme
which might have been causing the browser weirdness with the toolbar that Daniel saw. not sure that this works. the swoopy image for the typical set somehow got lost - is this OK?to test this:
checkout out branch
feature/lunr-search
run
bundle exec jekyll serve
test in all broswers.