|
| 1 | +# Contributing to Apache Zeppelin Documentation |
| 2 | + |
| 3 | +## Folder Structure |
| 4 | +`docs/` folder is organized as below: |
| 5 | + |
| 6 | +``` |
| 7 | +docs/ |
| 8 | + ├── _includes/themes/zeppelin |
| 9 | + │ ├── _navigation.html |
| 10 | + │ └── default.html |
| 11 | + ├── _layouts |
| 12 | + ├── _plugins |
| 13 | + ├── assets/themes/zeppelin -> {ASSET_PATH} |
| 14 | + │ ├── bootstrap |
| 15 | + │ ├── css |
| 16 | + │ ├── img |
| 17 | + │ └── js |
| 18 | + ├── development/ *.md |
| 19 | + ├── displaysystem/ *.md |
| 20 | + ├── install/ *.md |
| 21 | + ├── interpreter/ *.md |
| 22 | + ├── manual/ *.md |
| 23 | + ├── quickstart/ *.md |
| 24 | + ├── rest-api/ *.md |
| 25 | + ├── security/ *.md |
| 26 | + ├── storage/ *.md |
| 27 | + ├── Gemfile |
| 28 | + ├── Gemfile.lock |
| 29 | + ├── _config.yml |
| 30 | + ├── index.md |
| 31 | + └── ... |
| 32 | +``` |
| 33 | + |
| 34 | + - `_navigation.html`: the dropdown menu in navbar |
| 35 | + - `default.html` & `_layouts/`: define default HTML layout |
| 36 | + - `_plugins/`: custom plugin `*.rb` files can be placed in this folder. See [jekyll/plugins](https://jekyllrb.com/docs/plugins/) for the further information. |
| 37 | + - `{ASSET_PATH}/css/style.css`: extra css components can be defined |
| 38 | + - `{ASSET_PATH}/img/docs-img/`: image files used for document pages can be placed in this folder |
| 39 | + - `{ASSET_PATH}/js/`: extra `.js` files can be placed |
| 40 | + - `Gemfile`: defines bundle dependencies. They will be installed by `bundle install`. |
| 41 | + - `Gemfile.lock`: when you run `bundle install`, bundler will persist all gems name and their version to this file. For the more details, see [Bundle "The Gemfile Lock"](http://bundler.io/v1.10/man/bundle-install.1.html#THE-GEMFILE-LOCK) |
| 42 | + - `documentation_group`: `development/`, `displaysystem/`, `install/`, `interpreter/`... |
| 43 | + - `_config.yml`: defines configuration options for docs website. See [jekyll/configuration](https://jekyllrb.com/docs/configuration/) for the other available config variables. |
| 44 | + - `index.md`: the main page of `http://zeppelin.apache.org/docs/<ZEPPELIN_VERSION>/` |
| 45 | + |
| 46 | + |
| 47 | +## Markdown |
| 48 | +Zeppelin documentation pages are written with [Markdown](http://daringfireball.net/projects/markdown/). It is possible to use [GitHub flavored syntax](https://help.github.com/categories/writing-on-github/) and intermix plain HTML. |
| 49 | + |
| 50 | +## Front matter |
| 51 | +Every page contains [YAML front matter](https://jekyllrb.com/docs/frontmatter/) block in their header. Don't forget to wrap the front matter list with triple-dashed lines(`---`) like below. |
| 52 | +The document page should start this triple-dashed lines. Or you will face 404 error, since Jekyll can't find the page. |
| 53 | + |
| 54 | +``` |
| 55 | +--- |
| 56 | +layout: page |
| 57 | +title: "Apache Zeppelin Tutorial" |
| 58 | +description: "This tutorial page contains a short walk-through tutorial that uses Apache Spark backend. Please note that this tutorial is valid for Spark 1.3 and higher." |
| 59 | +group: quickstart |
| 60 | +--- |
| 61 | +``` |
| 62 | + |
| 63 | + - `layout`: the default layout is `page` which is defined in `_layout/page.html`. |
| 64 | + - `title`: the title for the document. Please note that if it needs to include `Zeppelin`, it should be `Apache Zeppelin`, not `Zeppelin`. |
| 65 | + - `description`: a short description for the document. One or two sentences would be enough. This description also will be shown as an extract sentence when people search pages. |
| 66 | + - `group`: a category of the document page |
| 67 | + |
| 68 | +## Headings |
| 69 | +All documents are structured with headings. From these headings, you can automatically generate a **Table of Contents**. There is a simple rule for Zeppelin docs headings. |
| 70 | + |
| 71 | +``` |
| 72 | +# Level-1 heading <- used only for the main title |
| 73 | +## Level-2 heading <- start with this |
| 74 | +### Level-3 heading |
| 75 | +#### Level-4 heading <- won't be converted in TOC from this level |
| 76 | +``` |
| 77 | + |
| 78 | +## Table of contents(TOC) |
| 79 | + |
| 80 | +``` |
| 81 | +<div id="toc"></div> |
| 82 | +``` |
| 83 | + |
| 84 | +Add this line below `# main title` in order to generate a **Table of Contents**. Headings until `### (Level-3 heading)` are included to TOC. |
| 85 | + |
| 86 | + |
| 87 | +Default setting options for TOC are definded in [here](https://github.com/apache/zeppelin/blob/master/docs/assets/themes/zeppelin/js/toc.js#L4). |
| 88 | + |
| 89 | + |
| 90 | +## Adding new pages |
| 91 | +If you're going to create new pages, there are some spots you need to add the location of the page. |
| 92 | + |
| 93 | + - **Dropdown menu in navbar**: add your docs location to [_navigation.html](https://github.com/apache/zeppelin/blob/master/docs/_includes/themes/zeppelin/_navigation.html) |
| 94 | + - **Main index**: add your docs below [What is the next?](http://zeppelin.apache.org/docs/latest/#what-is-the-next) section in [index.md](https://github.com/apache/zeppelin/blob/master/docs/index.md) with a short description. No need to do this if the page is for **Interpreters**. |
0 commit comments