https://github.com/cebe/js-search
A client side search engine for use on static pages.
https://github.com/cebe/js-search
Last synced: about 1 year ago
JSON representation
A client side search engine for use on static pages.
- Host: GitHub
- URL: https://github.com/cebe/js-search
- Owner: cebe
- License: mit
- Created: 2014-04-24T08:46:15.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2018-01-21T14:30:51.000Z (over 8 years ago)
- Last Synced: 2025-03-29T16:08:00.686Z (about 1 year ago)
- Language: PHP
- Homepage: http://cebe.github.io/js-search/#demo
- Size: 349 KB
- Stars: 139
- Watchers: 7
- Forks: 25
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
js-search
=========
This is a client side search engine for use on static pages.
It uses a pre-compiled search index to add a fulltext search to static HTML pages such as
[github pages][] or offline API documentation. The index is built by a PHP script using a
similar yet much more simplified and dump approach than the popular search engine [Lucene].
To see how it looks like, check out the [demo][].
[github pages]: https://pages.github.com/
[Lucene]: http://lucene.apache.org/
[demo]: http://cebe.github.io/js-search/#demo
Installation
------------
PHP 5.4 or higher is required to run the index generator.
Installation is recommended to be done via [composer](https://getcomposer.org/) by adding the following to the `require` section in your `composer.json`:
```json
"cebe/js-search": "~0.9"
```
Alternatively run `composer require "cebe/js-search"`.
Usage
-----
TODO.
See [example.html](example.html) for an implementation.
### Generate the index
Using the command line tool:
```
vendor/bin/jsindex
```
This will generate a `jssearch.index.js` file that you have to include in the HTML header.