[FLINK-3132] [docs] Initial docs restructure

[pr-comments] Decrease font size

[pr-comments] Remove docker connector section

This closes #1499.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/ad267a4b
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/ad267a4b
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/ad267a4b

Branch: refs/heads/master
Commit: ad267a4b199979536dd8a5572628eefc77d7e0f4
Parents: e43b970
Author: Ufuk Celebi <u...@apache.org>
Authored: Thu Dec 24 01:19:02 2015 +0100
Committer: Ufuk Celebi <u...@apache.org>
Committed: Fri Jan 15 16:47:55 2016 +0100

----------------------------------------------------------------------
 docs/README.md                                  |  111 +-
 docs/_config.yml                                |   11 +-
 docs/_includes/navbar.html                      |   72 +-
 docs/_layouts/base.html                         |    4 -
 docs/_layouts/plain.html                        |   86 +-
 docs/_plugins/highlightCode.rb                  |    3 +-
 docs/_plugins/info.rb                           |   20 +
 docs/_plugins/top.rb                            |   14 +
 docs/_plugins/warn.rb                           |   20 +
 docs/apis/batch/dataset_transformations.md      | 2105 +++++++++
 docs/apis/batch/examples.md                     |  521 +++
 docs/apis/batch/fault_tolerance.md              |  100 +
 docs/apis/batch/fig/LICENSE.txt                 |   17 +
 .../fig/iterations_delta_iterate_operator.png   |  Bin 0 -> 113607 bytes
 ...terations_delta_iterate_operator_example.png |  Bin 0 -> 335057 bytes
 .../batch/fig/iterations_iterate_operator.png   |  Bin 0 -> 63465 bytes
 .../fig/iterations_iterate_operator_example.png |  Bin 0 -> 102925 bytes
 docs/apis/batch/fig/iterations_supersteps.png   |  Bin 0 -> 54098 bytes
 docs/apis/batch/fig/plan_visualizer.png         |  Bin 0 -> 145778 bytes
 docs/apis/batch/hadoop_compatibility.md         |  249 ++
 docs/apis/batch/index.md                        | 3411 +++++++++++++++
 docs/apis/batch/iterations.md                   |  213 +
 docs/apis/batch/python.md                       |  610 +++
 docs/apis/best_practices.md                     |    7 +-
 docs/apis/cli.md                                |    3 +
 docs/apis/cluster_execution.md                  |    7 +-
 docs/apis/connectors.md                         |  241 ++
 docs/apis/dataset_transformations.md            | 2099 ---------
 docs/apis/example_connectors.md                 |  235 -
 docs/apis/examples.md                           |  516 ---
 docs/apis/fault_tolerance.md                    |  265 --
 docs/apis/fig/LICENSE.txt                       |   17 -
 .../fig/iterations_delta_iterate_operator.png   |  Bin 113607 -> 0 bytes
 ...terations_delta_iterate_operator_example.png |  Bin 335057 -> 0 bytes
 docs/apis/fig/iterations_iterate_operator.png   |  Bin 63465 -> 0 bytes
 .../fig/iterations_iterate_operator_example.png |  Bin 102925 -> 0 bytes
 docs/apis/fig/iterations_supersteps.png         |  Bin 54098 -> 0 bytes
 docs/apis/fig/plan_visualizer.png               |  Bin 145778 -> 0 bytes
 docs/apis/fig/savepoints-overview.png           |  Bin 62824 -> 0 bytes
 docs/apis/fig/savepoints-program_ids.png        |  Bin 55492 -> 0 bytes
 docs/apis/filesystems.md                        |  236 +
 docs/apis/hadoop_compatibility.md               |  246 --
 docs/apis/index.md                              |    2 +-
 docs/apis/iterations.md                         |  209 -
 docs/apis/java8.md                              |   38 +-
 docs/apis/local_execution.md                    |    9 +-
 docs/apis/programming_guide.md                  | 3401 ---------------
 docs/apis/python.md                             |  606 ---
 docs/apis/savepoints.md                         |  108 -
 docs/apis/scala_shell.md                        |    8 +-
 docs/apis/state_backends.md                     |  121 -
 docs/apis/storm_compatibility.md                |  285 --
 docs/apis/streaming/connectors/elasticsearch.md |  165 +
 docs/apis/streaming/connectors/hdfs.md          |  115 +
 docs/apis/streaming/connectors/index.md         |   24 +
 docs/apis/streaming/connectors/kafka.md         |  160 +
 docs/apis/streaming/connectors/rabbitmq.md      |  102 +
 docs/apis/streaming/connectors/twitter.md       |   89 +
 docs/apis/streaming/fault_tolerance.md          |  196 +
 docs/apis/streaming/fig/LICENSE.txt             |   17 +
 docs/apis/streaming/fig/savepoints-overview.png |  Bin 0 -> 62824 bytes
 .../streaming/fig/savepoints-program_ids.png    |  Bin 0 -> 55492 bytes
 docs/apis/streaming/index.md                    | 3306 ++++++++++++++
 docs/apis/streaming/savepoints.md               |  110 +
 docs/apis/streaming/state_backends.md           |  123 +
 docs/apis/streaming/storm_compatibility.md      |  287 ++
 docs/apis/streaming_guide.md                    | 4038 ------------------
 docs/apis/zip_elements_guide.md                 |  106 -
 docs/internals/add_operator.md                  |    4 +
 docs/internals/general_arch.md                  |    4 +
 docs/internals/ide_setup.md                     |    5 +-
 docs/internals/job_scheduling.md                |    3 +
 docs/internals/logging.md                       |    4 +
 docs/internals/monitoring_rest_api.md           |    3 +
 docs/internals/stream_checkpointing.md          |    4 +
 docs/internals/types_serialization.md           |    3 +
 docs/libs/gelly_guide.md                        |  105 +-
 docs/libs/index.md                              |   10 +-
 docs/libs/ml/als.md                             |    8 +-
 docs/libs/ml/contribution_guide.md              |    8 +-
 docs/libs/ml/distance_metrics.md                |    8 +-
 docs/libs/ml/index.md                           |   12 +-
 docs/libs/ml/min_max_scaler.md                  |    6 +-
 docs/libs/ml/multiple_linear_regression.md      |    8 +-
 docs/libs/ml/optimization.md                    |    7 +-
 docs/libs/ml/pipelines.md                       |    7 +-
 docs/libs/ml/polynomial_features.md             |    7 +-
 docs/libs/ml/quickstart.md                      |    7 +-
 docs/libs/ml/standard_scaler.md                 |    7 +-
 docs/libs/ml/svm.md                             |    7 +-
 docs/libs/table.md                              |   12 +-
 docs/page/css/flink.css                         |  120 +-
 docs/quickstart/java_api_quickstart.md          |    4 +
 docs/quickstart/run_example_quickstart.md       |    4 +
 docs/quickstart/scala_api_quickstart.md         |    4 +
 docs/quickstart/setup_quickstart.md             |    4 +
 docs/setup/building.md                          |  110 +-
 docs/setup/cluster_setup.md                     |  301 +-
 docs/setup/config.md                            |  464 +-
 docs/setup/gce_setup.md                         |   27 +-
 docs/setup/jobmanager_high_availability.md      |    3 +
 docs/setup/local_setup.md                       |   25 +-
 docs/setup/yarn_setup.md                        |   46 +-
 103 files changed, 13239 insertions(+), 13186 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/ad267a4b/docs/README.md
----------------------------------------------------------------------
diff --git a/docs/README.md b/docs/README.md
index 05dcecb..d37dc77 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -6,9 +6,9 @@ http://flink.apache.org/ is also generated from the files found 
here.
 
 # Requirements
 
-We use Markdown to write and Jekyll to translate the documentation to static 
HTML. Kramdown is 
+We use Markdown to write and Jekyll to translate the documentation to static 
HTML. Kramdown is
 needed for Markdown processing and the Python based Pygments is used for 
syntax highlighting. To run
-Javascript code from Ruby, you need to install a javascript runtime (e.g. 
`therubyracer`). You can 
+Javascript code from Ruby, you need to install a javascript runtime (e.g. 
`therubyracer`). You can
 install all needed software via the following commands:
 
     gem install jekyll -v 2.5.3
@@ -16,13 +16,13 @@ install all needed software via the following commands:
     gem install pygments.rb -v 0.6.3
     gem install therubyracer -v 0.12.2
     sudo easy_install Pygments
-    
-Note that in Ubuntu based systems, it may be necessary to install the 
`ruby-dev` and 
+
+Note that in Ubuntu based systems, it may be necessary to install the 
`ruby-dev` and
 `python-setuptools` packages via apt.
 
 # Using Dockerized Jekyll
 
-We dockerized the jekyll environment above. If you have 
[docker](https://docs.docker.com/), 
+We dockerized the jekyll environment above. If you have 
[docker](https://docs.docker.com/),
 you can run following command to start the container.
 
 ```
@@ -33,7 +33,6 @@ cd flink/docs/docker
 It takes a few moment to build the image for the first time, but will be a 
second from the second time.
 The run.sh command brings you in a bash session where you can run following 
doc commands.
 
-
 # Build
 
 The `docs/build_docs.sh` script calls Jekyll and generates the documentation 
in `docs/target`. You
@@ -44,12 +43,13 @@ If you call the script with the preview flag `build_docs.sh 
-p`, Jekyll will sta
 
 # Contribute
 
-The documentation pages are written in
-[Markdown](http://daringfireball.net/projects/markdown/syntax). It is possible 
to use the
-[GitHub flavored syntax](http://github.github.com/github-flavored-markdown) 
and intermix plain html.
+## Markdown
+
+The documentation pages are written in 
[Markdown](http://daringfireball.net/projects/markdown/syntax). It is possible 
to use [GitHub flavored 
syntax](http://github.github.com/github-flavored-markdown) and intermix plain 
html.
 
-In addition to Markdown, every page contains a Jekyll front matter, which 
specifies the title of the
-page and the layout to use. The title is used as the top-level heading for the 
page.
+## Front matter
+
+In addition to Markdown, every page contains a Jekyll front matter, which 
specifies the title of the page and the layout to use. The title is used as the 
top-level heading for the page. The default layout is `plain` (found in 
`_layouts`).
 
     ---
     title: "Title of the Page"
@@ -59,20 +59,93 @@ Furthermore, you can access variables found in 
`docs/_config.yml` as follows:
 
     {{ site.NAME }}
 
-This will be replaced with the value of the variable called `NAME` when 
generating
-the docs.
+This will be replaced with the value of the variable called `NAME` when 
generating the docs.
+
+## Structure
 
-All documents are structed with headings. From these heading, a page outline is
-automatically generated for each page.
+### Page
+
+#### Headings
+
+All documents are structured with headings. From these headings, you can 
automatically generate a page table of contents (see below).
 
 ```
-# Level-1 Heading  <- Used for the title of the page
+# Level-1 Heading  <- Used for the title of the page (don't use this)
 ## Level-2 Heading <- Start with this one
 ### Level-3 heading
 #### Level-4 heading
 ##### Level-5 heading
 ```
 
-Please stick to the "logical order" when using the headlines, e.g. start with 
level-2 headings and
-use level-3 headings for subsections, etc. Don't use a different ordering, 
because you don't like
-how a headline looks.
+Please stick to the "logical order" when using the headlines, e.g. start with 
level-2 headings and use level-3 headings for subsections, etc. Don't use a 
different ordering, because you don't like how a headline looks.
+
+#### Table of Contents
+
+    * This will be replaced by the TOC
+    {:toc}
+
+
+Add this markup (both lines) to the document in order to generate a table of 
contents for the page. Headings until level 3 headings are included.
+
+You can exclude a heading from the table of contents:
+
+    # Excluded heading
+    {:.no_toc}
+
+#### Back to Top
+
+       {% top %}
+
+This will be replaced by a default back to top link. It is recommended to use 
these links at least at the end of each level-2 section.
+
+#### Labels
+
+       {% info %}
+       {% warn %}
+
+These will be replaced by a info or warning label. You can change the text of 
the label by providing an argument:
+
+    {% info Recommendation %}
+
+### Documentation
+
+#### Top Navigation
+
+You can modify the top-level navigation in two places. You can either edit the 
`_includes/navbar.html` file or add tags to your page frontmatter (recommended).
+
+    # Top-level navigation
+    top-nav-group: apis
+    top-nav-pos: 2
+    top-nav-title: <strong>Batch Guide</strong> (DataSet API)
+
+This adds the page to the group `apis` (via `top-nav-group`) at position `2` 
(via `top-nav-pos`). Furthermore, it specifies a custom title for the 
navigation via `top-nav-title`. If this field is missing, the regular page 
title (via `title`) will be used. If no position is specified, the element will 
be added to the end of the group. If no group is specified, the page will not 
show up.
+
+Currently, there are groups `quickstart`, `setup`, `deployment`, `apis`, 
`libs`, and `internals`.
+
+#### Sub Navigation
+
+A sub navigation is shown if the field `sub-nav-group` is specified. A sub 
navigation groups all pages with the same `sub-nav-group`. Check out the 
streaming or batch guide as an example.
+
+    # Sub-level navigation
+    sub-nav-group: batch
+    sub-nav-id: dataset_api
+    sub-nav-pos: 1
+    sub-nav-title: DataSet API
+
+The fields work similar to their `top-nav-*` counterparts.
+
+In addition, you can specify a hierarchy via `sub-nav-id` and `sub-nav-parent`:
+
+    # Sub-level navigation
+    sub-nav-group: batch
+    sub-nav-parent: dataset_api
+    sub-nav-pos: 1
+    sub-nav-title: Transformations
+
+This will show the `Transformations` page under the `DataSet API` page. The 
`sub-nav-parent` field has to have a matching `sub-nav-id`.
+
+#### Breadcrumbs
+
+Pages with sub navigations can use breadcrumbs like `Batch Guide > Libraries > 
Machine Learning > Optimization`.
+
+The breadcrumbs for the last page are generated from the front matter. For the 
a sub navigation root to appear (like `Batch Guide` in the example above), you 
have to specify the `sub-nav-group-title`. This field designates a group page 
as the root.

http://git-wip-us.apache.org/repos/asf/flink/blob/ad267a4b/docs/_config.yml
----------------------------------------------------------------------
diff --git a/docs/_config.yml b/docs/_config.yml
index 98fb505..6b93bfc 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -5,9 +5,9 @@
 # to you under the Apache License, Version 2.0 (the
 # "License"); you may not use this file except in compliance
 # with the License.  You may obtain a copy of the License at
-# 
+#
 # http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing,
 # software distributed under the License is distributed on an
 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -22,7 +22,6 @@
 #     {{ site.CONFIG_KEY }}
 #------------------------------------------------------------------------------
 
-
 # This are the version referenced in the docs. Please only use these variables
 # to reference a specific Flink version, because this is the only place where
 # we change the version for the complete docs when forking of a release branch
@@ -56,12 +55,16 @@ defaults:
       path: ""
     values:
       layout: plain
+      top-nav-pos: 99999 # Move to end
+      sub-nav-pos: 99999 # Move to end
 
 markdown: KramdownPygments
 highlighter: pygments
 
 kramdown:
-    toc_levels: 1..3
+  input: GFM # GitHub syntax
+  hard_wrap: false # Don't translate new lines to <br>s
+  toc_levels: 1..3 # Include h1-h3 for ToC
 
 host: 0.0.0.0
 

http://git-wip-us.apache.org/repos/asf/flink/blob/ad267a4b/docs/_includes/navbar.html
----------------------------------------------------------------------
diff --git a/docs/_includes/navbar.html b/docs/_includes/navbar.html
index 362558d..ea78d45 100644
--- a/docs/_includes/navbar.html
+++ b/docs/_includes/navbar.html
@@ -39,16 +39,16 @@ under the License.
         <!-- The navigation links. -->
         <div class="collapse navbar-collapse" 
id="bs-example-navbar-collapse-1">
           <ul class="nav navbar-nav">
-            <li{% if page.url == '/' %} class="active"{% endif %}><a href="{{ 
site.baseurl}}/">Documentation<span class="hidden-sm hidden-xs"> {{ 
site.version_short }}</span></a></li>
+            <li class="hidden-sm {% if page.url == '/' %}active{% endif %}"><a 
href="{{ site.baseurl}}/">Documentation {{ site.version_short }}</a></li>
 
             <!-- Quickstart -->
             <li class="dropdown{% if page.url contains '/quickstart/' %} 
active{% endif %}">
               <a href="{{ quickstart }}" class="dropdown-toggle" 
data-toggle="dropdown" role="button" aria-expanded="false">Quickstart <span 
class="caret"></span></a>
               <ul class="dropdown-menu" role="menu">
-                <li><a href="{{ quickstart 
}}/setup_quickstart.html">Setup</a></li>
-                <li><a href="{{ quickstart }}/java_api_quickstart.html">Java 
API</a></li>
-                <li><a href="{{ quickstart }}/scala_api_quickstart.html">Scala 
API</a></li>
-                <li><a href="{{ quickstart }}/run_example_quickstart.html">Run 
Step-by-Step Example</a></li>
+                {% assign quickstart_group = (site.pages | where: 
"top-nav-group" , "quickstart" | sort: "top-nav-pos") %}
+                {% for quickstart_page in quickstart_group %}
+                <li class="{% if page.url contains quickstart_page.url 
%}active{% endif %}"><a href="{{ site.baseurl }}{{ quickstart_page.url }}">{% 
if quickstart_page.top-nav-title %}{{ quickstart_page.top-nav-title }}{% else 
%}{{ quickstart_page.title }}{% endif %}</a></li>
+                {% endfor %}
               </ul>
             </li>
 
@@ -56,18 +56,17 @@ under the License.
             <li class="dropdown{% if page.url contains '/setup/' %} active{% 
endif %}">
               <a href="{{ setup }}" class="dropdown-toggle" 
data-toggle="dropdown" role="button" aria-expanded="false">Setup <span 
class="caret"></span></a>
               <ul class="dropdown-menu" role="menu">
-                <li><a href="{{ setup }}/building.html">Build Flink {{ 
site.version }}</a></li>
+                {% assign setup_group = (site.pages | where: "top-nav-group" , 
"setup" | sort: "top-nav-pos") %}
+                {% for setup_group_page in setup_group %}
+                <li class="{% if page.url contains setup_group_page.url 
%}active{% endif %}"><a href="{{ site.baseurl }}{{ setup_group_page.url }}">{% 
if setup_group_page.top-nav-title %}{{ setup_group_page.top-nav-title }}{% else 
%}{{ setup_group_page.title }}{% endif %}</a></li>
+                {% endfor %}
 
                 <li class="divider"></li>
                 <li role="presentation" 
class="dropdown-header"><strong>Deployment</strong></li>
-                <li><a href="{{ setup }}/local_setup.html" 
class="active">Local</a></li>
-                <li><a href="{{ setup }}/cluster_setup.html">Cluster 
(Standalone)</a></li>
-                <li><a href="{{ setup }}/yarn_setup.html">YARN</a></li>
-                <li><a href="{{ setup }}/gce_setup.html">GCloud</a></li>
-                <li><a href="{{ setup 
}}/jobmanager_high_availability.html">JobManager High Availability</a></li>
-
-                <li class="divider"></li>
-                <li><a href="{{ setup }}/config.html">Configuration</a></li>
+                {% assign deployment_group = (site.pages | where: 
"top-nav-group" , "deployment" | sort: "top-nav-pos") %}
+                {% for deployment_group_page in deployment_group %}
+                <li class="{% if page.url contains deployment_group_page.url 
%}active{% endif %}"><a href="{{ site.baseurl }}{{ deployment_group_page.url 
}}">{% if deployment_group_page.top-nav-title %}{{ 
deployment_group_page.top-nav-title }}{% else %}{{ deployment_group_page.title 
}}{% endif %}</a></li>
+                {% endfor %}
               </ul>
             </li>
 
@@ -75,26 +74,10 @@ under the License.
             <li class="dropdown{% if page.url contains '/apis/' %} active{% 
endif %}">
               <a href="{{ apis }}" class="dropdown-toggle" 
data-toggle="dropdown" role="button" aria-expanded="false">Programming Guides 
<span class="caret"></span></a>
               <ul class="dropdown-menu" role="menu">
-                <li><a href="{{ apis 
}}/programming_guide.html"><strong>DataSet API</strong></a></li>
-                <li><a href="{{ apis 
}}/streaming_guide.html"><strong>DataStream API</strong></a></li>
-                <li><a href="{{ apis }}/python.html">Python API <span 
class="badge">Beta</span></a></li>
-
-                <li class="divider"></li>
-                <li><a href="{{ apis }}/fault_tolerance.html">Fault 
Tolerance</a></li>
-                <li><a href="{{ apis }}/state_backends.html">State in 
Streaming Programs</a></li>
-                <li><a href="{{ apis }}/savepoints.html">Savepoints</a></li>
-                <li><a href="{{ apis }}/scala_shell.html">Interactive Scala 
Shell</a></li>
-                <li><a href="{{ apis }}/dataset_transformations.html">DataSet 
Transformations</a></li>
-                <li><a href="{{ apis }}/best_practices.html">Best 
Practices</a></li>
-                <li><a href="{{ apis }}/example_connectors.html">Connectors 
(DataSet API)</a></li>
-                <li><a href="{{ apis }}/examples.html">Examples</a></li>
-                <li><a href="{{ apis }}/local_execution.html">Local 
Execution</a></li>
-                <li><a href="{{ apis }}/cluster_execution.html">Cluster 
Execution</a></li>
-                <li><a href="{{ apis }}/cli.html">Command Line 
Interface</a></li>
-                <li><a href="{{ apis }}/iterations.html">Iterations (DataSet 
API)</a></li>
-                <li><a href="{{ apis }}/java8.html">Java 8</a></li>
-                <li><a href="{{ apis }}/hadoop_compatibility.html">Hadoop 
Compatibility <span class="badge">Beta</span></a></li>
-                <li><a href="{{ apis }}/storm_compatibility.html">Storm 
Compatibility <span class="badge">Beta</span></a></li>
+                {% assign apis_group = (site.pages | where: "top-nav-group" , 
"apis" | sort: "top-nav-pos") %}
+                {% for apis_group_page in apis_group %}
+                <li class="{% if page.url contains apis_group_page.url 
%}active{% endif %}"><a href="{{ site.baseurl }}{{ apis_group_page.url }}">{% 
if apis_group_page.top-nav-title %}{{ apis_group_page.top-nav-title }}{% else 
%}{{ apis_group_page.title }}{% endif %}</a></li>
+                {% endfor %}
               </ul>
             </li>
 
@@ -102,9 +85,10 @@ under the License.
             <li class="dropdown{% if page.url contains '/libs/' %} active{% 
endif %}">
               <a href="{{ libs }}" class="dropdown-toggle" 
data-toggle="dropdown" role="button" aria-expanded="false">Libraries <span 
class="caret"></span></a>
                 <ul class="dropdown-menu" role="menu">
-                  <li><a href="{{ libs }}/gelly_guide.html">Graphs: 
Gelly</a></li>
-                  <li><a href="{{ libs }}/ml/">Machine Learning <span 
class="badge">Beta</span></a></li>
-                  <li><a href="{{ libs }}/table.html">Relational: Table <span 
class="badge">Beta</span></a></li>
+                  {% assign libs_group = (site.pages | where: "top-nav-group" 
, "libs" | sort: "top-nav-pos") %}
+                  {% for libs_page in libs_group %}
+                  <li class="{% if page.url contains libs_page.url %}active{% 
endif %}"><a href="{{ site.baseurl }}{{ libs_page.url }}">{% if 
libs_page.top-nav-title %}{{ libs_page.top-nav-title }}{% else %}{{ 
libs_page.title }}{% endif %}</a></li>
+                  {% endfor %}
               </ul>
             </li>
 
@@ -115,16 +99,10 @@ under the License.
                 <li role="presentation" 
class="dropdown-header"><strong>Contribute</strong></li>
                 <li><a 
href="http://flink.apache.org/how-to-contribute.html";><small><span 
class="glyphicon glyphicon-new-window"></span></small> How to 
Contribute</a></li>
                 <li><a 
href="http://flink.apache.org/contribute-code.html#coding-guidelines";><small><span
 class="glyphicon glyphicon-new-window"></span></small> Coding 
Guidelines</a></li>
-                <li><a href="{{ internals }}/ide_setup.html">IDE Setup</a></li>
-                <li><a href="{{ internals }}/logging.html">Logging</a></li>
-                <li class="divider"></li>
-                <li role="presentation" 
class="dropdown-header"><strong>Internals</strong></li>
-                <li><a href="{{ internals }}/general_arch.html">Architecture 
&amp; Process Model</a></li>
-                <li><a href="{{ internals }}/stream_checkpointing.html">Fault 
Tolerance for Data Streaming</a></li>
-                <li><a href="{{ internals }}/types_serialization.html">Type 
Extraction &amp; Serialization</a></li>
-                <li><a href="{{ internals 
}}/monitoring_rest_api.html">Monitoring REST API</a></li>
-                <li><a href="{{ internals }}/job_scheduling.html">Jobs &amp; 
Scheduling</a></li>
-                <li><a href="{{ internals }}/add_operator.html">How-To: Add an 
Operator</a></li>
+                {% assign internals_group = (site.pages | where: 
"top-nav-group" , "internals" | sort: "top-nav-pos") %}
+                {% for internals_page in internals_group %}
+                <li class="{% if page.url contains internals_page.url 
%}active{% endif %}"><a href="{{ site.baseurl }}{{ internals_page.url }}">{% if 
internals_page.top-nav-title %}{{ internals_page.top-nav-title }}{% else %}{{ 
internals_page.title }}{% endif %}</a></li>
+                {% endfor %}
               </ul>
             </li>
           </ul>

http://git-wip-us.apache.org/repos/asf/flink/blob/ad267a4b/docs/_layouts/base.html
----------------------------------------------------------------------
diff --git a/docs/_layouts/base.html b/docs/_layouts/base.html
index dfd0f65..d4e74ef 100644
--- a/docs/_layouts/base.html
+++ b/docs/_layouts/base.html
@@ -23,11 +23,7 @@ under the License.
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <!-- The above 3 meta tags *must* come first in the head; any other head 
content must come *after* these tags -->
-    {% if page.htmlTitle %}
-    <title>Apache Flink {{ site.version}} Documentation: {{ page.htmlTitle 
}}</title>
-    {% else %}
     <title>Apache Flink {{ site.version}} Documentation: {{ page.title 
}}</title>
-    {% endif %}
     <link rel="shortcut icon" href="{{ site.baseurl }}/page/favicon.ico" 
type="image/x-icon">
     <link rel="icon" href="{{ site.baseurl }}/page/favicon.ico" 
type="image/x-icon">
 

http://git-wip-us.apache.org/repos/asf/flink/blob/ad267a4b/docs/_layouts/plain.html
----------------------------------------------------------------------
diff --git a/docs/_layouts/plain.html b/docs/_layouts/plain.html
index 6dd9305..f064879 100644
--- a/docs/_layouts/plain.html
+++ b/docs/_layouts/plain.html
@@ -20,14 +20,92 @@ specific language governing permissions and limitations
 under the License.
 -->
 <div class="row">
-  <div class="col-sm-10 col-sm-offset-1">
-    <h1>{{ page.title }}{% if page.is_beta %} <span 
class="badge">Beta</span>{% endif %}</h1>
+{% if page.sub-nav-group %}
+{% comment %}
+The plain layout with a sub navigation.
 
-{{ content }}
+- This is activated via the 'sub-nav-group' field in the preemble.
+- All pages of this sub nav group will be displayed in the sub navigation:
+  * Each element without a 'sub-nav-parent' field will be displayed on the 1st 
level, where the position is defined via 'sub-nav-pos'.
+  * If the page should be displayed as a child element, it needs to specify a 
'sub-nav-parent' field, which matches the 'sub-nav-id' of its parent. The 
parent only needs to specify this if it expects child nodes.
+{% endcomment %}
+  <!-- Sub Navigation -->
+  <div class="col-sm-3">
+    <ul id="sub-nav">
+      {% comment %} Get all pages belonging to this group sorted by their 
position {% endcomment %}
+      {% assign group = (site.pages | where: "sub-nav-group" , 
page.sub-nav-group | where: "sub-nav-parent" , nil | sort: "sub-nav-pos") %}
+      {% for group_page in group %}
+        {% if group_page.sub-nav-id  %}
+        {% assign sub_group = (site.pages | where: "sub-nav-group" , 
page.sub-nav-group | where: "sub-nav-parent" , group_page.sub-nav-id | sort: 
"sub-nav-pos") %}
+        {% else %}
+        {% assign sub_group = nil %}
+        {% endif %}
+        <li><a href="{{ site.baseurl }}{{ group_page.url }}" class="{% if 
page.url contains group_page.url %}active{% endif %}">{% if 
group_page.sub-nav-title %}{{ group_page.sub-nav-title }}{% else %}{{ 
group_page.title }}{% endif %}</a>
+          {% if sub_group and sub_group.size() > 0 %}
+          <ul>
+            {% for sub_group_page in sub_group %}
+              <li><a href="{{ site.baseurl }}{{ sub_group_page.url }}" 
class="{% if page.url contains sub_group_page.url or (sub_group_page.sub-nav-id 
and page.sub-nav-parent and sub_group_page.sub-nav-id == page.sub-nav-parent) 
%}active{% endif %}">{% if sub_group_page.sub-nav-title %}{{ 
sub_group_page.sub-nav-title }}{% else %}{{ sub_group_page.title }}{% endif 
%}</a></li>
+            {% endfor %}
+          </ul>
+          {% endif %}
+        </li>
+      {% endfor %}
+    </ul>
   </div>
+  <!-- Main -->
+  <div class="col-sm-9">
+    <!-- Top anchor -->
+    <a href="#top"></a>
+
+    <!-- Breadcrumbs above the main heading -->
+    <ol class="breadcrumb">
+      {% for group_page in group %}
+      {% if group_page.sub-nav-group-title %}
+      <li><a href="{{ site.baseurl }}{{ group_page.url }}">{{ 
group_page.sub-nav-group-title }}</a></li>
+      {% endif %}
+      {% endfor %}
+
+      {% if page.sub-nav-parent %}
+      {% assign parent = (site.pages | where: "sub-nav-group" , 
page.sub-nav-group | where: "sub-nav-id" , page.sub-nav-parent | first) %}
+      {% if parent %}
+
+      {% if parent.sub-nav-parent %}
+      {% assign grandparent = (site.pages | where: "sub-nav-group" , 
page.sub-nav-group | where: "sub-nav-id" , parent.sub-nav-parent | first) %}
+
+      {% if grandparent %}
+      <li><a href="{{ site.baseurl }}{{ grandparent.url }}">{% if 
grandparent.sub-nav-title %}{{ grandparent.sub-nav-title }}{% else %}{{ 
grandparent.title }}{% endif %}</a></li>
+      {% endif %}
+
+      {% endif %}
 
-  <div class="col-sm-10 col-sm-offset-1">
+      <li><a href="{{ site.baseurl }}{{ parent.url }}">{% if 
parent.sub-nav-title %}{{ parent.sub-nav-title }}{% else %}{{ parent.title }}{% 
endif %}</a></li>
+      {% endif %}
+      {% endif %}
+      <li class="active">{% if page.sub-nav-title %}{{ page.sub-nav-title }}{% 
else %}{{ page.title }}{% endif %}</li>
+    </ol>
+
+    <div class="text">
+      <!-- Main heading -->
+      <h1>{{ page.title }}{% if page.is_beta %} <span 
class="beta">(Beta)</span>{% endif %}</h1>
+
+      <!-- Content -->
+      {{ content }}
+    </div>
+  </div>
+{% else %}
+{% comment %}
+The plain layout without a sub navigation (only text).
+{% endcomment %}
+  <div class="col-md-8 col-md-offset-2 text">
+    <h1>{{ page.title }}{% if page.is_beta %} <span 
class="badge">Beta</span>{% endif %}</h1>
+{{ content }}
+  </div>
+{% endif %}
+  {% comment %}
+  Removed until Robert complains... ;)
+  <div class="col-sm-8 col-sm-offset-2">
     <!-- Disqus thread and some vertical offset -->
     <div style="margin-top: 75px; margin-bottom: 50px" 
id="disqus_thread"></div>
   </div>
+  {% endcomment %}
 </div>

http://git-wip-us.apache.org/repos/asf/flink/blob/ad267a4b/docs/_plugins/highlightCode.rb
----------------------------------------------------------------------
diff --git a/docs/_plugins/highlightCode.rb b/docs/_plugins/highlightCode.rb
index 5da8b07..74f6d6f 100644
--- a/docs/_plugins/highlightCode.rb
+++ b/docs/_plugins/highlightCode.rb
@@ -91,7 +91,8 @@ class Jekyll::Converters::Markdown::KramdownPygments
         :toc_levels           => @config['kramdown']['toc_levels'],
         :smart_quotes         => @config['kramdown']['smart_quotes'],
         :coderay_default_lang => @config['kramdown']['default_lang'],
-        :input                => @config['kramdown']['input']
+        :input                => @config['kramdown']['input'],
+        :hard_wrap            => @config['kramdown']['hard_wrap']
     }).to_pygs
     return html
   end

http://git-wip-us.apache.org/repos/asf/flink/blob/ad267a4b/docs/_plugins/info.rb
----------------------------------------------------------------------
diff --git a/docs/_plugins/info.rb b/docs/_plugins/info.rb
new file mode 100644
index 0000000..de3238d
--- /dev/null
+++ b/docs/_plugins/info.rb
@@ -0,0 +1,20 @@
+module Jekyll
+  class InfoTag < Liquid::Tag
+
+    def initialize(tag_name, text, tokens)
+      super
+      @text = text
+    end
+
+    def render(context)
+       if @text.to_s == ''
+               @text = "Info"
+       end
+
+       @text = @text.strip! || @text if !@text.nil?
+       "<span class=\"label label-info\">#{@text}</span>"
+    end
+  end
+end
+
+Liquid::Template.register_tag('info', Jekyll::InfoTag)

http://git-wip-us.apache.org/repos/asf/flink/blob/ad267a4b/docs/_plugins/top.rb
----------------------------------------------------------------------
diff --git a/docs/_plugins/top.rb b/docs/_plugins/top.rb
new file mode 100644
index 0000000..da7846e
--- /dev/null
+++ b/docs/_plugins/top.rb
@@ -0,0 +1,14 @@
+module Jekyll
+  class TopTag < Liquid::Tag
+
+    def initialize(tag_name, text, tokens)
+      super
+    end
+
+    def render(context)
+       "<a href=\"\#top\" class=\"top pull-right\"><span class=\"glyphicon 
glyphicon-chevron-up\"></span> Back to top</a>"
+    end
+  end
+end
+
+Liquid::Template.register_tag('top', Jekyll::TopTag)

http://git-wip-us.apache.org/repos/asf/flink/blob/ad267a4b/docs/_plugins/warn.rb
----------------------------------------------------------------------
diff --git a/docs/_plugins/warn.rb b/docs/_plugins/warn.rb
new file mode 100644
index 0000000..b9eaad4
--- /dev/null
+++ b/docs/_plugins/warn.rb
@@ -0,0 +1,20 @@
+module Jekyll
+  class WarnTag < Liquid::Tag
+
+    def initialize(tag_name, text, tokens)
+      super
+      @text = text
+    end
+
+    def render(context)
+       if @text.to_s == ''
+               @text = "Warning"
+       end
+
+       @text = @text.strip! || @text if !@text.nil?
+       "<span class=\"label label-danger\">#{@text}</span>"
+    end
+  end
+end
+
+Liquid::Template.register_tag('warn', Jekyll::WarnTag)

Reply via email to