GitHub user AhyoungRyu opened 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 it works?**
      
      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.)
    Using this data, 
[search.js](https://github.com/AhyoungRyu/zeppelin/blob/6e02423f541cc406e4e41031629609a276a9f481/docs/assets/themes/zeppelin/js/search.js)
 will do this job!
    
    ### 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. Build docs site -> 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)
    <img width="985" alt="screen shot 2016-08-03 at 5 01 46 am" 
src="https://cloud.githubusercontent.com/assets/10060731/17343202/71185300-5937-11e6-9e57-687bf2839cfb.png";>
    
    
![search](https://cloud.githubusercontent.com/assets/10060731/17343154/3df052f2-5937-11e6-950a-ba922576914d.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 881a6b036e70bfb05f12c8a633f10c873508de9d
Author: AhyoungRyu <fbdkdu...@hanmail.net>
Date:   2016-08-02T19:11:27Z

    Add js files: lunr.min.js & search.js

commit d261a63a7581ed0cc7ca3d78c46ae4b074a17ba7
Author: AhyoungRyu <fbdkdu...@hanmail.net>
Date:   2016-08-02T19:13:25Z

    Add template for storing docs info based on jekyll front matter

commit 495d6c420d975653f48926e055cc299e043daaa8
Author: AhyoungRyu <fbdkdu...@hanmail.net>
Date:   2016-08-02T19:16:27Z

    Keep consistency all docs' front matter for the right search result

commit 09e023d86cfc48794f3df53529266f8fd6e65832
Author: AhyoungRyu <fbdkdu...@hanmail.net>
Date:   2016-08-02T19:16:51Z

    Add search icon to navbar

commit d55ce76f310634298c5605f8b5a9ff2e1f3dcd6c
Author: AhyoungRyu <fbdkdu...@hanmail.net>
Date:   2016-08-02T19:17:08Z

    Add searching page

commit d24c536f67c597db77751cbb383d113916bf769e
Author: AhyoungRyu <fbdkdu...@hanmail.net>
Date:   2016-08-02T19:19:02Z

    Attach 'Apache Zeppelin ZEPPELIN_VERSION Documentation: ' to title

commit 6e02423f541cc406e4e41031629609a276a9f481
Author: AhyoungRyu <fbdkdu...@hanmail.net>
Date:   2016-08-02T19:20:03Z

    Apply css style for the search results

commit 0f3457d8c4aaebe4419f68c48a6422494d54a2d2
Author: AhyoungRyu <fbdkdu...@hanmail.net>
Date:   2016-08-02T20:12:11Z

    Add lunr.min.js license info

commit e6ab4b7a424f6681001eb14dffad9bdae4b2e03d
Author: AhyoungRyu <fbdkdu...@hanmail.net>
Date:   2016-08-02T20:12:42Z

    Exclude lunr.min.js

----


---
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.
---

Reply via email to