Skip to content

Commit

Permalink
[docs] Change doc layout
Browse files Browse the repository at this point in the history
- Changed layout (simple as possible)
- Fix broken version references in docs
- Update README
- Removed dead resources
- Reorganized content

[docs] Address PR comments

[docs] Address @ktzoumas comments

[docs] Fix download link

[docs] Fix front page stack link to Tez

This closes apache#606.
  • Loading branch information
uce committed Apr 22, 2015
1 parent 6df1dd2 commit f1ee90c
Show file tree
Hide file tree
Showing 117 changed files with 713 additions and 14,459 deletions.
54 changes: 27 additions & 27 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
This README gives an overview of how to build and contribute to the
documentation of Apache Flink.
This README gives an overview of how to build and contribute to the documentation of Apache Flink.

The documentation is included with the source of Apache Flink in order to ensure
that you always have docs corresponding to your checked out version. The online
documentation at http:https://flink.apache.org/ is also generated from the
files found here.
The documentation is included with the source of Apache Flink in order to ensure that you always
have docs corresponding to your checked out version. The online documentation at
http:https://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. You can install all needed software via:
We use Markdown to write and Jekyll to translate the documentation to static HTML. You can install
all needed software via:

gem install jekyll
gem install redcarpet
gem install kramdown
sudo easy_install Pygments

Redcarpet is needed for Markdown processing and the Python based Pygments is
used for syntax highlighting.
Kramdown is needed for Markdown processing and the Python based Pygments is used for syntax
highlighting.

# Build

The `docs/build_docs.sh` script calls Jekyll and generates the documentation to
`docs/target`. You can then point your browser to `docs/target/index.html` and
start reading.
The `docs/_build_docs.sh` script calls Jekyll and generates the documentation in `docs/target`. You
can then point your browser to `docs/target/index.html` and start reading.

If you call the script with the preview flag `build_docs.sh -p`, Jekyll will
start a web server at `localhost:4000` and continiously generate the docs.
This is useful to preview changes locally.
If you call the script with the preview flag `_build_docs.sh -p`, Jekyll will start a web server at
`localhost:4000` and watch the docs directory for updates. Use this mode to preview changes locally.

# Contribute

The documentation pages are written in
[Markdown](http:https://daringfireball.net/projects/markdown/syntax). It is possible
to use the [GitHub flavored syntax](http:https://github.github.com/github-flavored-markdown)
and intermix plain html.
[Markdown](http:https://daringfireball.net/projects/markdown/syntax). It is possible to use the
[GitHub flavored syntax](http:https://github.github.com/github-flavored-markdown) and intermix plain html.

In addition to Markdown, every page contains a front matter, which specifies the
title of the page. This title is used as the top-level heading for the page.
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.

---
title: "Title of the Page"
---

Furthermore, you can access variables found in `docs/_config.yml` as follows:

{{ site.FLINK_VERSION_SHORT }}
{{ site.NAME }}

This will be replaced with the value of the variable when generating the docs.
This will be replaced with the value of the variable called `NAME` when generating
the docs.

All documents are structed with headings. From these heading, an page outline is
All documents are structed with headings. From these heading, a page outline is
automatically generated for each page.

```
# Level-1 Heading
## Level-2 Heading
# Level-1 Heading <- Used for the title of the page
## 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.
43 changes: 24 additions & 19 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,33 @@
# {{ site.CONFIG_KEY }}
#------------------------------------------------------------------------------

FLINK_VERSION_THIS_HADOOP1: "0.9-hadoop1-SNAPSHOT"
FLINK_VERSION_THIS_HADOOP2: "0.9-SNAPSHOT"
FLINK_VERSION_THIS_SHORT: "0.9"
FLINK_WGET_URL_YARN_THIS: http:https://stratosphere-bin.s3-website-us-east-1.amazonaws.com/flink-0.9-SNAPSHOT-bin-hadoop2.tgz

# 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
# etc.
version: "0.9-SNAPSHOT"
version_hadoop1: "0.9-hadoop1-SNAPSHOT"
version_short: "0.9" # Used for the top navbar w/o snapshot suffix

# This is the Scala version we use in this version
scala_version: "2.10"

FLINK_VERSION_HADOOP1_STABLE: "0.8.1-hadoop1" # this variable can point to a SNAPSHOT version in the git source.
FLINK_VERSION_SHORT: "0.8.1"
FLINK_VERSION_HADOOP2_STABLE: "0.8.1"
FLINK_SCALA_VERSION: "2.10.4"
FLINK_SCALA_VERSION_SHORT: "2.10"
FLINK_ISSUES_URL: https://issues.apache.org/jira/browse/FLINK
FLINK_GITHUB_URL: https://github.com/apache/flink
# Download urls
download_url: "http:https://flink.apache.org/downloads.html"
download_url_hadoop1: "http:https://stratosphere-bin.s3-website-us-east-1.amazonaws.com/flink-0.9-SNAPSHOT-bin-hadoop1.tgz"
download_url_hadoop2: "http:https://stratosphere-bin.s3-website-us-east-1.amazonaws.com/flink-0.9-SNAPSHOT-bin-hadoop2.tgz"

FLINK_WEBSITE_URL: http:https://flink.apache.org
FLINK_DOWNLOAD_URL: http:https://flink.apache.org/downloads.html
# Some commonly linked pages (this was more important to have as a variable
# during incubator; by now it should also be fine to hardcode these.)
website_url: "http:https://flink.apache.org"
jira_url: "https://issues.apache.org/jira/browse/FLINK"
github_url: "https://github.com/apache/flink"

FLINK_DOWNLOAD_URL_HADOOP1_STABLE: http:https://www.apache.org/dyn/closer.cgi/flink/flink-0.8.1/flink-0.8.1-bin-hadoop1.tgz
FLINK_DOWNLOAD_URL_HADOOP2_STABLE: http:https://www.apache.org/dyn/closer.cgi/flink/flink-0.8.1/flink-0.8.1-bin-hadoop2.tgz
FLINK_DOWNLOAD_URL_YARN_STABLE: http:https://www.apache.org/dyn/closer.cgi/flink/flink-0.8.1/flink-0.8.1-bin-hadoop2-yarn.tgz
FLINK_WGET_URL_YARN_STABLE: http:https://artfiles.org/apache.org/flink/flink-0.8.1/flink-0.8.1-bin-hadoop2-yarn.tgz
# Setup quickstart uses this => to be changed
FLINK_DOWNLOAD_URL_HADOOP1_STABLE: "http:https://www.apache.org/dyn/closer.cgi/flink/flink-0.8.1/flink-0.8.1-bin-hadoop1.tgz"
FLINK_DOWNLOAD_URL_HADOOP2_STABLE: "http:https://www.apache.org/dyn/closer.cgi/flink/flink-0.8.1/flink-0.8.1-bin-hadoop2.tgz"
FLINK_DOWNLOAD_URL_YARN_STABLE: "http:https://www.apache.org/dyn/closer.cgi/flink/flink-0.8.1/flink-0.8.1-bin-hadoop2-yarn.tgz"

#------------------------------------------------------------------------------
# BUILD CONFIG
Expand All @@ -57,7 +62,7 @@ defaults:
scope:
path: ""
values:
layout: default
layout: plain

markdown: KramdownPygments
highlighter: pygments
Expand All @@ -67,4 +72,4 @@ kramdown:

host: localhost

baseurl: http:https://ci.apache.org/projects/flink/flink-docs-master
baseurl: http:https://ci.apache.org/projects/flink/flink-docs-master
21 changes: 0 additions & 21 deletions docs/_includes/footer.md

This file was deleted.

146 changes: 100 additions & 46 deletions docs/_includes/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,52 +16,106 @@
specific language governing permissions and limitations
under the License.
-->
<nav class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container">
<div class="row">
<div class="col-md-1 af-mobile-nav-bar">
{% comment %}
We might be on an externally hosted documentation site.
Please keep the site.FLINK_WEBSITE_URL below to ensure a link back to the Flink website.
{% endcomment %}
<a href="{{ site.FLINK_WEBSITE_URL }}/index.html" title="Home">
<img class="hidden-xs hidden-sm img-responsive"
src="{{ site.baseurl }}/img/logo.png" alt="Apache Flink Logo">
</a>
<div class="row visible-xs">
<div class="col-xs-3">
<a href="{{ site.baseurl }}/index.html" title="Home">
<img class="hidden-x hidden-sm img-responsive"
src="{{ site.baseurl }}/img/logo.png" alt="Apache Flink Logo">
</a>
</div>
<div class="col-xs-5"></div>
<div class="col-xs-4">
<div class="af-mobile-btn">
<span class="glyphicon glyphicon-plus"></span>
</div>
</div>
</div>
</div>
<!-- Navigation -->
<div class="col-md-11">
<div class="collapse navbar-collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav">
{% capture setup %}{{site.baseurl}}/setup{% endcapture %}
{% capture apis %}{{site.baseurl}}/apis{% endcapture %}
{% capture libs %}{{site.baseurl}}/libs{% endcapture %}
{% capture internals %}{{site.baseurl}}/internals{% endcapture %}
<!-- Top navbar. -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<!-- The logo. -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="navbar-logo">
<a href="{{ site.baseurl }}/"><img alt="Apache Flink" src="{{ site.baseurl }}/page/img/navbar-brand-logo.jpg"></a>
</div>
</div><!-- /.navbar-header -->

<li>
<a href="{{ site.baseurl }}/index.html" class="{% if page.url contains 'index.html' %}active{% endif %}">Documentation</a>
</li>
<!-- The navigation links. -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li{% if page.url == '/index.html' %} class="active"{% endif %}><a href="{{ site.baseurl}}/index.html">Overview<span class="hidden-sm hidden-xs"> {{ site.version_short }}</span></a></li>

<li>
<a href="{{ site.baseurl }}/api/java/index.html">Javadoc</a>
</li>
<!-- Setup -->
<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">Get Flink 0.9-SNAPSHOT</a></li>

<li>
<a href="{{ site.baseurl }}/api/scala/index.html#org.apache.flink.api.scala.package">Scaladoc</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</nav>
<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 }}/flink_on_tez.html">Flink on Tez <span class="badge">Beta</span></a></li>

<li class="divider"></li>
<li><a href="{{ setup }}/config.html">Configuration</a></li>
</ul>
</li>

<!-- Programming Guides -->
<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>Batch: DataSet API</strong></a></li>
<li><a href="{{ apis }}/streaming_guide.html"><strong>Streaming: DataStream API</strong> <span class="badge">Beta</span></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 }}/dataset_transformations.html">Dataset Transformations</a></li>
<li><a href="{{ apis }}/example_connectors.html">Connectors</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 }}/web_client.html">Web Client</a></li>
<li><a href="{{ apis }}/iterations.html">Iterations</a></li>
<li><a href="{{ apis }}/java8.html">Java 8</a></li>
<li><a href="{{ apis }}/hadoop_compatibility.html">Hadoop Compatability <span class="badge">Beta</span></a></li>
</ul>
</li>

<!-- Libraries -->
<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 }}/spargel_guide.html">Graphs: Spargel</a></li>
<li><a href="{{ libs }}/gelly_guide.html">Graphs: Gelly <span class="badge">Beta</span></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>
</ul>
</li>

<!-- Internals -->
<li class="dropdown{% if page.url contains internals %} active{% endif %}">
<a href="{{ internals }}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Internals <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li role="presentation" class="dropdown-header"><strong>Contribute</strong></li>
<li><a href="{{ internals }}/how_to_contribute.html">How to Contribute</a></li>
<li><a href="{{ internals }}/coding_guidelines.html">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 }}/types_serialization.html">Type Extraction &amp; Serialization</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>
</ul>
</li>
</ul>
<form class="navbar-form navbar-right hidden-sm hidden-md" role="search" action="search-results.html">
<div class="form-group">
<input type="text" class="form-control" name="q" placeholder="Search all pages">
</div>
<button type="submit" class="btn btn-default">Search</button>
</form>
</div><!-- /.navbar-collapse -->
</div><!-- /.container -->
</nav>
Loading

0 comments on commit f1ee90c

Please sign in to comment.