You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ja...@apache.org on 2019/05/21 02:24:22 UTC

[flink] branch master updated: [FLINK-12560][docs] Documentation language build flags

This is an automated email from the ASF dual-hosted git repository.

jark pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 5c5342e  [FLINK-12560][docs] Documentation language build flags
5c5342e is described below

commit 5c5342e0499e08ebe4fa5b3b57818939ed75b84b
Author: Seth Wiesman <sj...@gmail.com>
AuthorDate: Mon May 20 09:33:37 2019 -0500

    [FLINK-12560][docs] Documentation language build flags
    
    This closes #8489
---
 docs/README.md          |  7 +++++++
 docs/_config_dev_en.yml | 19 +++++++++++++++++++
 docs/_config_dev_zh.yml | 22 ++++++++++++++++++++++
 docs/build_docs.sh      | 14 ++++++++++++--
 4 files changed, 60 insertions(+), 2 deletions(-)

diff --git a/docs/README.md b/docs/README.md
index 79af68e..9d6f389 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -50,6 +50,13 @@ 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.
 
+| Flag | Action | 
+| -----| -------| 
+| -p   | Run interactive preview | 
+| -i   | Incremental builds | 
+| -e   | Build only English docs |
+| -z   | Build only Chinese docs |
+
 ## Generate configuration tables
 
 Configuration descriptions are auto generated from code. To trigger the generation you need to run:
diff --git a/docs/_config_dev_en.yml b/docs/_config_dev_en.yml
new file mode 100644
index 0000000..b2854a2
--- /dev/null
+++ b/docs/_config_dev_en.yml
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# 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
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License
+
+exclude:
+  - "*.zh.md"
diff --git a/docs/_config_dev_zh.yml b/docs/_config_dev_zh.yml
new file mode 100644
index 0000000..4fd3887
--- /dev/null
+++ b/docs/_config_dev_zh.yml
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# 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
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License
+
+exclude:
+  - "*.md"
+
+include:
+  - "*.zh.md"
diff --git a/docs/build_docs.sh b/docs/build_docs.sh
index 40de149..1ab46f1 100755
--- a/docs/build_docs.sh
+++ b/docs/build_docs.sh
@@ -51,9 +51,13 @@ DOCS_DST=${DOCS_SRC}/content
 # default jekyll command is to just build site
 JEKYLL_CMD="build"
 
+JEKYLL_CONFIG=""
+
 # if -p flag is provided, serve site on localhost
 # -i is like -p, but incremental (only rebuilds the modified file)
-while getopts "pi" opt; do
+# -e builds only english documentation
+# -z builds only chinese documentation 
+while getopts "piez" opt; do
 	case $opt in
 		p)
 		JEKYLL_CMD="serve --baseurl= --watch"
@@ -62,8 +66,14 @@ while getopts "pi" opt; do
 		[[ `${RUBY} -v` =~ 'ruby 1' ]] && echo "Error: building the docs with the incremental option requires at least ruby 2.0" && exit 1
 		JEKYLL_CMD="liveserve --baseurl= --watch --incremental"
 		;;
+		e)
+		JEKYLL_CONFIG="--config _config.yml,_config_dev_en.yml"
+		;;
+		z)
+		JEKYLL_CONFIG="--config _config.yml,_config_dev_zh.yml"
+		;;
 	esac
 done
 
 # use 'bundle exec' to insert the local Ruby dependencies
-bundle exec jekyll ${JEKYLL_CMD} --source "${DOCS_SRC}" --destination "${DOCS_DST}"
+bundle exec jekyll ${JEKYLL_CMD} ${JEKYLL_CONFIG} --source "${DOCS_SRC}" --destination "${DOCS_DST}"