tree: 9f073ec26ac513636814b51a9b02ea22f117fc2c [path history] [tgz]
  1. .gitignore
  3. Gemfile
  4. Gemfile.lock
  6. _config.yml
  7. _config_dev_en.yml
  8. _config_dev_zh.yml
  9. _includes/
  10. _layouts/
  11. _plugins/
  14. concepts/
  15. deployment-and-operations/
  16. docker/
  17. fig/
  18. getting-started/
  20. io-module/
  21. page/
  22. sdk/

This README gives an overview of how to build and contribute to the documentation of Apache Flink Stateful Functions.

The documentation is included with the source of Apache Flink Stateful Functions in order to ensure that you always have docs corresponding to your checked out version. The online documentation at is also generated from the files found here.


The dependencies are declared in the Gemfile in this directory. We use Markdown to write and Jekyll to translate the documentation to static HTML. All required dependencies are installed locally when you build the documentation through the script. If you want to install the software manually, use Ruby's Bundler Gem to install all dependencies:

gem install bundler -v 1.16.1
bundle install

Note that in Ubuntu based systems, it may be necessary to install the following packages: rubygems ruby-dev libssl-dev build-essential.

Using Dockerized Jekyll

We dockerized the jekyll environment above. If you have docker, you can run following command to start the container.

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 command brings you in a bash session where you run the ./ script mentioned above.


The docs/ script installs dependencies locally, calls Jekyll, and generates the documentation in docs/content. You can then point your browser to docs/content/index.html and start reading.

If you call the script with the preview flag -p, Jekyll will start a web server at localhost:4000 and watch the docs directory for updates. Use this mode to preview changes locally.

You can call the script with the incremental flag -i. Jekyll will then serve a live preview at localhost:4000, and it will be much faster because it will only rebuild the pages corresponding to files that are modified. Note that if you are making changes that affect the sidebar navigation, you'll have to build the entire site to see those changes reflected on every page.

-pRun interactive preview
-iIncremental builds
-eBuild only English docs
-zBuild only Chinese docs



The documentation pages are written in Markdown. It is possible to use GitHub flavored syntax and intermix plain html.

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"

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.




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 (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.

Table of Contents

* This will be replaced by the 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

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.


{% 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 %}



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.

The structure of the navigation is determined by the front matter of 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. There is no limitation on how many levels you can nest.

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.

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.

The nesting is also used for the breadcrumbs like Application Development > Libraries > Machine Learning > Optimization.