GitHub user AhyoungRyu reopened a pull request: https://github.com/apache/zeppelin/pull/1266
[ZEPPELIN-1219] Add searching feature to Zeppelin docs site ### What is this PR for? As more and more document pages are added, it's really hard to find specific pages. So I added searching feature to Zeppelin documentation site([jekyll](https://jekyllrb.com/) based site) using [lunr.js](http://lunrjs.com/). - **How does it work?** I created [`search_data.json`](https://github.com/AhyoungRyu/zeppelin/blob/6e02423f541cc406e4e41031629609a276a9f481/docs/search_data.json) which is used for docs info template. `lunr.js` combines all of the text from all of the docs in `docs/` into `_site/search_data.json`. It looks like below. ![screen shot 2016-08-03 at 4 49 59 am](https://cloud.githubusercontent.com/assets/10060731/17342828/f2908be8-5935-11e6-8eee-b189677c0531.png) All the info are comes from [Jekyll YAML front matter](https://jekyllrb.com/docs/frontmatter/) variables. (i.e. title, group, description.. that's why I rewrote all docs' title and description.) [search.js](https://github.com/AhyoungRyu/zeppelin/blob/6e02423f541cc406e4e41031629609a276a9f481/docs/assets/themes/zeppelin/js/search.js) will do this job using this data! ### What type of PR is it? Improvement & Feature ### Todos * [x] - Keep consistency for all docs pages' `Title` * [x] - Add some overview sentences to all docs pages' `Description` section (this will be used as the result preview) * [x] - Add apache license header to all docs page (some pages are missing the license header currently) * [x] - Add LICENSE for `lunr.min.js` ### What is the Jira issue? [ZEPPELIN-1219](https://issues.apache.org/jira/browse/ZEPPELIN-1219) ### How should this be tested? 1. Apply this patch and build `ZEPPELIN_HOME/docs` dir -> please see [docs/README.md#build-documentation](https://github.com/apache/zeppelin/tree/master/docs#build-documentation) 2. Click `search` icon in navbar and go to `search.html` page 3. Type anything you want to search in the search bar (i.e. type `python`, `spark`, `dynamic` ... ) ### Screenshots (if appropriate) ![screen shot 2016-08-03 at 4 42 28 pm](https://cloud.githubusercontent.com/assets/10060731/17357851/d092e2ca-5999-11e6-9917-a3d4113e6e43.png) ![search](https://cloud.githubusercontent.com/assets/10060731/17357828/b2486cd6-5999-11e6-873b-121fac033b03.gif) ### Questions: * Does the licenses files need update? Yes, for `lunr.min.js` * Is there breaking changes for older versions? no * Does this needs documentation? no You can merge this pull request into a Git repository by running: $ git pull https://github.com/AhyoungRyu/zeppelin ZEPPELIN-1219 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zeppelin/pull/1266.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1266 ---- commit 0705bd6beaade4270f44ec344abc10ee6e0a5759 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-02T19:11:27Z Add js files: lunr.min.js & search.js commit 040f53244c8557d81135aaa094347853da5ec576 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-02T19:13:25Z Add template for storing docs info based on jekyll front matter commit 0688a79b85c9ee2905a687c8fd969e01a746c220 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-02T19:16:27Z Keep consistency all docs' front matter for the right search result commit a951fa63f09171b1f113f01d51c3b99474a00c52 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-02T19:16:51Z Add search icon to navbar commit d908c371b2baa462121cb0e96035ddd43b8253d4 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-02T19:17:08Z Add searching page commit 68eb997b188d9838b2914c399000fa75bb9d9e94 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-02T19:19:02Z Attach 'Apache Zeppelin ZEPPELIN_VERSION Documentation: ' to title commit f6a05a6351c31093d398b18e8eb19637438566c2 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-02T19:20:03Z Apply css style for the search results commit 36ba7f1b15225d552ed8ad12c5af807ae7f50778 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-02T20:12:11Z Add lunr.min.js license info commit da0cff97aa0531472b42db0e92b7807b4975bf24 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-02T20:12:42Z Exclude lunr.min.js commit fa0129942d75fd556fe87e7f5d4787882ce93f5a Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-03T04:38:33Z Refine 'description' in some docs as @bzz suggested commit ee11136efa4764f61d6601ea0f45f004943d6453 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-03T04:46:50Z Fix some typos commit 6e775f5c28b80538fff1484b4eb1f66c795ca2c1 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-03T05:27:10Z Make pleasecontribute.md not to be searched commit 1381152effb7d5026fbaa2b7f8cd51e23ec74e20 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-03T05:57:24Z Fix search result skipping issue commit 624b0515ea26e1090f088809cf245742964c03fa Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-03T06:46:24Z Add Apache license header to search.js commit bd4956a17bb8ba59e92b1b1da391059183e5c16b Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-03T06:48:23Z Add docs.js & search.js to exclude list in pom.xml commit 9f1ba42fc2e2a11df06089f70cf5cffa5b6ee3fb Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-03T07:12:51Z Disable enterkey press & change icon commit 0389d28d2faa85ffb390096f491b7a2caa3401e6 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-03T07:47:28Z Make index.md not to be searched commit 6784282bedd18cb2903e7dd1cefcfddee01b63ab Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-03T07:47:49Z Minor search page UI update commit 34afd5d061e41702b00b0bbf7065e9bf1e61cd23 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-04T03:18:21Z Add Apache license header to search_data.json commit 91b71a72b081a8c2fe7a774db7c735d2c6f30715 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-06T05:38:15Z Remove Apache license header since JSON doesn't allow comment commit 7ec885486065527d52608a16152d04b6e729d00c Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-08-06T05:50:25Z Modify 'no result' sentence ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---