GitHub user AhyoungRyu reopened a pull request: https://github.com/apache/zeppelin/pull/1031
[ZEPPELIN-1018] Apply auto "Table of Contents" generator to Zeppelin docs website ### What is this PR for? I added auto TOC(Table of Contents) generator for Zeppelin documentation website. TOC can help people looking through whole contents at a glance and finding what they want quickly. I just added `<div id="toc"></div>` to the each documentation header. [`toc`](https://github.com/apache/zeppelin/compare/master...AhyoungRyu:ZEPPELIN-1018?expand=1#diff-85af09fb498a5667ea455391533f945dR3) recognize `<h2>` & `<h3>` as a title in the docs and it automatically generate TOC. So I set a rule for this work. (I'll write this rule on `docs/CONTRIBUTING.md` or [docs/howtocontributewebsite](https://zeppelin.apache.org/docs/0.6.0-SNAPSHOT/development/howtocontributewebsite.html)). ``` # Level-1 Heading <- Use only for the main title of the page ## Level-2 Heading <- Start with this one ### Level-3 heading <- Only use this one for child of Level-2 toc only recognize Level-2 & Level-3 ``` Please see the below attached screenshot image. ### What type of PR is it? Improvement & Documentation ### Todos * [x] - Add TOC generator * [x] - Apply TOC(`<div id="toc"></div>`) to every documentation and reorganize each headers(apply the above rule) * [x] - Fix some broken code block in several docs * [x] - Apply TOC to `r.md` (Currently R docs has some duplicated info since [this one](https://github.com/apache/zeppelin/commit/d5e87fb8ba98f08db5b0a4995104ce19f182c678) and [this one](https://github.com/apache/zeppelin/commit/7d6cc7e99154e2d337c11fdf8be1a874ed3e9ada) ) * [x] - Apply TOC to `install.md` after #1010 merged ### What is the Jira issue? [ZEPPELIN-1018](https://issues.apache.org/jira/browse/ZEPPELIN-1018) ### How should this be tested? 1. Apply this patch and build `docs/` with [this guide](https://github.com/apache/zeppelin/tree/master/docs#build-documentation) 2. Visit some docs page. Then you can see TOC in the header of page. ### Screenshots (if appropriate) - Automatically generated TOC in Spark interpreter docs page <img width="831" alt="screen shot 2016-06-16 at 9 37 18 pm" src="https://cloud.githubusercontent.com/assets/10060731/16140902/945b9c7a-340a-11e6-91f3-b6174738bed0.png"> ### Questions: * Does the licenses files need update? No. Actually I used [jekyll-table-of-contents#copyright](https://github.com/ghiculescu/jekyll-table-of-contents#copyright). But I don't need to add a license for this :) * Is there breaking changes for older versions? No * Does this needs documentation? Maybe You can merge this pull request into a Git repository by running: $ git pull https://github.com/AhyoungRyu/incubator-zeppelin ZEPPELIN-1018 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zeppelin/pull/1031.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 #1031 ---- commit 6c44ca9e0764857d3eb168290be0c1426cf35a32 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-17T01:10:06Z Add toc.js for auto generating TOC commit 36aeecb1d95d85802ccf9a1e3aac11ba264ddee1 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-17T02:40:17Z Change toc configuration commit 03b3cb5a3846ed5f72e6bbaa3e50ffb42582ba2f Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-17T02:41:49Z Apply auto TOC to all of docs under docs/security/ commit 8ce20fede41e23d14b56669f6be23b8463c215eb Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-17T02:42:17Z Apply auto TOC to all of docs under docs/interpreter/ commit 7630053c1e6cac6cb8d3c37954eb442fb7c02dd4 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-17T02:42:32Z Apply auto TOC to all of docs under docs/development/ commit 62edb9de146485c82c6b52a0ad33ff022fa0ad39 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-17T02:42:46Z Apply auto TOC to all of docs under docs/manual/ commit fe5e6abe6005b12ae02c9d0c148f6c72990d98e5 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-17T02:42:59Z Apply auto TOC to all of docs under docs/rest-api/ commit 851d42ee12b8b89515969cd779c5e807a17f3274 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-17T02:43:15Z Apply auto TOC to all of docs under docs/displaysystem/ commit fcc66d2efd711b1b86ee93f51428445c319fb7c2 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-17T02:43:28Z Apply auto TOC to all of docs under docs/install/ commit 7e9bd0d2342b9bab5b2e8d811210e379a8681ba4 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-17T02:43:40Z Apply auto TOC to all of docs under docs/quickstart/ commit 4a0a07a4ad18d3fdd189a0f5e5cec18f5d7c9c5a Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-17T02:44:01Z Apply auto TOC to all of docs under docs/storage/ commit 7474d4db9df57d05faed415476098b34ac2bdf49 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-17T02:44:47Z Resize TOC tab indent commit 6a25bf042d0e2274528624aa51fffe6ef41d112e Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-17T07:59:56Z Address @felixcheung feedback commit a7143ce91f75c61d0e4f5cf2f8051c5d7c840eaa Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-20T08:22:21Z Apply auto generated toc to install.md commit 02205169782104669c896250299d9d2cce463aae Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-20T18:53:39Z Exclude toc.js from pom.xml commit 41214e6b03a51a021c5cd6f7ce74a1af9b0436ef Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-21T06:04:17Z Remove duplicated info in r.md & apply toc commit 323890ea03f0a53bac01a4f763fdc33df6bcdd8b Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-21T06:05:41Z Move interpreter/screenshot/ -> asset/../img/docs-img/ commit 8433b9ad9f71abab47d1d6ed6a3ae5840944a40e Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-21T06:05:54Z Fix image path in python.md ---- --- 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. ---