diff --git a/LICENSE b/LICENSE index 07df05f2488c00fdc4897d57949d181b963ebcd7..f7699dadc699d17b66ebecd5afe16cc51c47b16d 100644 --- a/LICENSE +++ b/LICENSE @@ -225,7 +225,7 @@ The Apache Flink project bundles the following files under the MIT License: - dagre v0.7.4 (https://github.com/cpettitt/dagre) - Copyright (c) 2012-2014 Chris Pettitt - dagre-d3 v0.4.17 (https://github.com/cpettitt/dagre-d3) - Copyright (c) 2013 Chris Pettitt - EvEmitter v1.0.2 (https://github.com/metafizzy/ev-emitter) - Copyright (C) 2016 David DeSandro - - Font Awesome (code) v4.5.0 (http://fontawesome.io) - Copyright (c) 2014 Dave Gandy + - Font Awesome (code) v4.5.0, v4.6.3 (http://fontawesome.io) - Copyright (c) 2014 Dave Gandy - graphlib v1.0.7 (https://github.com/cpettitt/graphlib) - Copyright (c) 2012-2014 Chris Pettitt - imagesloaded v4.1.0 (https://github.com/desandro/imagesloaded) - Copyright (C) 2016 David DeSandro - JQuery v2.2.0 (http://jquery.com/) - Copyright 2014 jQuery Foundation and other contributors @@ -300,7 +300,8 @@ The Apache Flink project bundles the following fonts under the Open Font License (OFT) - http://scripts.sil.org/OFL - Font Awesome (http://fortawesome.github.io/Font-Awesome/) - Created by Dave Gandy - -> fonts in "flink-runtime-web/web-dashboard/assets/fonts" + -> fonts in "flink-runtime-web/web-dashboard/web/fonts" + -> fonts in "docs/page/font-awesome/fonts" ----------------------------------------------------------------------- The ISC License diff --git a/docs/README.md b/docs/README.md index 52dfad32a82d864b7738a2f87376319ea2812a5b..879c33bbc2e75b03950abdf48f0a607aee0c2f77 100644 --- a/docs/README.md +++ b/docs/README.md @@ -109,43 +109,19 @@ These will be replaced by a info or warning label. You can change the text of th ### Documentation -#### Top Navigation +#### 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). +The navigation on the left side of the docs is automatically generated when building the docs. You can modify the markup in `_include/sidenav.html`. - # Top-level navigation - top-nav-group: apis - top-nav-pos: 2 - top-nav-title: Batch Guide (DataSet API) +The structure of the navigation is determined by the front matter of all pages. The fields used to determine the structure are: -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. +- `nav-id` => ID of this page. Other pages can use this ID as their parent ID. +- `nav-parent_id` => ID of the parent. This page will be listed under the page with id `nav-parent_id`. -Currently, there are groups `quickstart`, `setup`, `deployment`, `apis`, `libs`, and `internals`. +Level 0 is made up of all pages, which have nav-parent_id set to `root`. There is no limitation on how many levels you can nest. -#### Sub Navigation +The `title` of the page is used as the default link text. You can override this via `nav-title`. The relative position per navigational level is determined by `nav-pos`. -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. +If you have a page with sub pages, the link target will be used to expand the sub level navigation. If you want to actually add a link to the page as well, you can add the `nav-show_overview: true` field to the front matter. This will then add an `Overview` sub page to the expanded list. - # 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. +The nesting is also used for the breadcrumbs like `Application Development > Libraries > Machine Learning > Optimization`. diff --git a/docs/_config.yml b/docs/_config.yml index d9bb57eedd001d8ad4b37688713d1bd2fcf76f12..700d28944c2e0fb84d6f63dcbb8ca8727bb74118 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -29,6 +29,7 @@ version: "1.2-SNAPSHOT" version_hadoop1: "1.2-hadoop1-SNAPSHOT" version_short: "1.2" # Used for the top navbar w/o snapshot suffix +is_snapshot_version: true # This suffix is appended to the Scala-dependent Maven artifact names scala_version_suffix: "_2.10" @@ -40,6 +41,16 @@ jira_url: "https://issues.apache.org/jira/browse/FLINK" github_url: "https://github.com/apache/flink" download_url: "http://flink.apache.org/downloads.html" +# Flag whether this is the latest stable version or not. If not, a warning +# will be printed pointing to the docs of the latest stable version. +is_latest: true +is_stable: false +latest_stable_url: http://ci.apache.org/projects/flink/flink-docs-release-1.1 + +previous_docs: + 1.1: http://ci.apache.org/projects/flink/flink-docs-release-1.1 + 1.0: http://ci.apache.org/projects/flink/flink-docs-release-1.0 + #------------------------------------------------------------------------------ # BUILD CONFIG #------------------------------------------------------------------------------ @@ -47,14 +58,16 @@ download_url: "http://flink.apache.org/downloads.html" # to change anything here. #------------------------------------------------------------------------------ +# Used in some documents to initialize arrays. Don't delete. +array: [] + defaults: - scope: path: "" values: layout: plain - top-nav-pos: 99999 # Move to end - sub-nav-pos: 99999 # Move to end + nav-pos: 99999 # Move to end if no pos specified markdown: KramdownPygments highlighter: pygments diff --git a/docs/_includes/navbar.html b/docs/_includes/navbar.html deleted file mode 100644 index 5821a469e58a698a0b666a2b420bc8b2be03e491..0000000000000000000000000000000000000000 --- a/docs/_includes/navbar.html +++ /dev/null @@ -1,117 +0,0 @@ - -{% capture quickstart %}{{site.baseurl}}/quickstart{% endcapture %} -{% capture setup %}{{site.baseurl}}/setup{% endcapture %} -{% capture apis %}{{site.baseurl}}/apis{% endcapture %} -{% capture libs %}{{site.baseurl}}/libs{% endcapture %} -{% capture internals %}{{site.baseurl}}/internals{% endcapture %} - - diff --git a/docs/_includes/sidenav.html b/docs/_includes/sidenav.html new file mode 100644 index 0000000000000000000000000000000000000000..b56bcf2414d548c75c802ee5dd08396573033398 --- /dev/null +++ b/docs/_includes/sidenav.html @@ -0,0 +1,149 @@ + + +{% comment %} +============================================================================== +Extract the active nav IDs. +============================================================================== +{% endcomment %} + +{% assign active_nav_ids = site.array %} +{% assign parent_id = page.nav-parent_id %} + +{% for i in (1..10) %} + {% if parent_id %} + {% assign active_nav_ids = active_nav_ids | push: parent_id %} + {% assign current = (site.pages | where: "nav-id" , parent_id | sort: "nav-pos") %} + {% if current.size > 0 %} + {% assign parent_id = current[0].nav-parent_id %} + {% else %} + {% break %} + {% endif %} + {% else %} + {% break %} + {% endif %} +{% endfor %} + +{% comment %} +============================================================================== +Build the nested list from nav-id and nav-parent_id relations. +============================================================================== +This builds a nested list from all pages. The fields used to determine the +structure are: + +- 'nav-id' => ID of this page. Other pages can use this ID as their + parent ID. +- 'nav-parent_id' => ID of the parent. This page will be listed under + the page with id 'nav-parent_id'. + +Level 0 is made up of all pages, which have nav-parent_id set to 'root'. + +The 'title' of the page is used as the default link text. You can +override this via 'nav-title'. The relative position per navigational +level is determined by 'nav-pos'. +{% endcomment %} + +{% assign elementsPosStack = site.array %} +{% assign posStack = site.array %} + +{% assign elements = site.array %} +{% assign children = (site.pages | where: "nav-parent_id" , "root" | sort: "nav-pos") %} +{% if children.size > 0 %} + {% assign elements = elements | push: children %} +{% endif %} + +{% assign elementsPos = 0 %} +{% assign pos = 0 %} + + + + {% assign elementsPosStack = elementsPosStack | pop %} + {% assign posStack = posStack | pop %} + {% endif %} + {% else %} + {% assign this = elements[elementsPos][pos] %} + + {% if this.url == page.url %} + {% assign active = true %} + {% elsif this.nav-id and active_nav_ids contains this.nav-id %} + {% assign active = true %} + {% else %} + {% assign active = false %} + {% endif %} + + {% capture title %}{% if this.nav-title %}{{ this.nav-title }}{% else %}{{ this.title }}{% endif %}{% endcapture %} + {% capture target %}"{{ site.baseurl }}{{ this.url }}"{% if active %} class="active"{% endif %}{% endcapture %} + {% capture overview_target %}"{{ site.baseurl }}{{ this.url }}"{% if this.url == page.url %} class="active"{% endif %}{% endcapture %} + + {% assign pos = pos | plus: 1 %} + {% if this.nav-id %} + {% assign children = (site.pages | where: "nav-parent_id" , this.nav-id | sort: "nav-pos") %} + {% if children.size > 0 %} + {% capture collapse_target %}"#collapse-{{ i }}" data-toggle="collapse"{% if active %} class="active"{% endif %}{% endcapture %} + {% capture expand %}{% unless active %} {% endunless %}{% endcapture %} +
  • {{ title }}{{ expand }}
    + + + +
    + +
    diff --git a/docs/_layouts/base.html b/docs/_layouts/base.html index 690d2af73da300c014cdac86fab1263f6144a7bf..21065ec262d5f070d4afe5f97eff9e3be99067b7 100644 --- a/docs/_layouts/base.html +++ b/docs/_layouts/base.html @@ -32,6 +32,7 @@ under the License. + {% if page.mathjax %}