Repository: incubator-gearpump
Updated Branches:
  refs/heads/master 6bef69cd7 -> 9ed67a12c


[GEARPUMP-305][Doc] Use mkdocs (1.0.1) plugin for templates instead o…

…f mustache workaround

Author: manuzhang <[email protected]>

Closes #251 from manuzhang/improve_doc_build.


Project: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-gearpump/commit/9ed67a12
Tree: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/tree/9ed67a12
Diff: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/diff/9ed67a12

Branch: refs/heads/master
Commit: 9ed67a12c3f166ffc8f6daf6a3939be90dd2705d
Parents: 6bef69c
Author: manuzhang <[email protected]>
Authored: Sun Aug 26 21:17:12 2018 +0800
Committer: manuzhang <[email protected]>
Committed: Sun Aug 26 21:17:27 2018 +0800

----------------------------------------------------------------------
 docs/README.md    |  1 -
 docs/build_doc.sh | 23 -----------------------
 docs/mkdocs.yml   | 16 ++++++++++++----
 docs/version.yml  |  6 ------
 4 files changed, 12 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/9ed67a12/docs/README.md
----------------------------------------------------------------------
diff --git a/docs/README.md b/docs/README.md
index 9cd6293..d193c86 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -17,7 +17,6 @@ all needed software via:
 
     sudo pip install mkdocs
     sudo gem install html-proofer
-    sudo gem install mustache
 
 
 If you are using Mac OSX 10.11+ (El Capitan), you will need to execute 
following command:

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/9ed67a12/docs/build_doc.sh
----------------------------------------------------------------------
diff --git a/docs/build_doc.sh b/docs/build_doc.sh
index a3e70de..5acd4ed 100755
--- a/docs/build_doc.sh
+++ b/docs/build_doc.sh
@@ -39,19 +39,6 @@ copy_dir() {
   cp -r $srcDir/* $destDir
 }
 
-render_files() {
-  for file in $2; do
-    if [ -d "$file" ];then
-      for child in "$file"/*; do
-        render_files $1 "$child"
-      done
-    elif [ -f "$file" ]; then
-      mustache $1 $file > tmp.md
-      mv tmp.md $file
-    fi
-  done
-}
-
 if [ $# -ne 2 ]; then
   help
   exit 1
@@ -60,16 +47,6 @@ fi
 export SCALA_VERSION=$1
 export BUILD_API=$2
 
-
-# render file templates
-echo "Rendering file templates using mustache..."
-TEMP_DIR="tmp"
-if [ -d "$TEMP_DIR" ]; then
-       rm -rf "$TEMP_DIR"
-fi
-copy_dir contents $TEMP_DIR
-render_files version.yml "$TEMP_DIR/introduction $TEMP_DIR/dev 
$TEMP_DIR/deployment $TEMP_DIR/api $TEMP_DIR/index.md"
-
 # generate site documents
 mkdocs build --clean
 

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/9ed67a12/docs/mkdocs.yml
----------------------------------------------------------------------
diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml
index ae5cf1b..1a11429 100644
--- a/docs/mkdocs.yml
+++ b/docs/mkdocs.yml
@@ -6,11 +6,9 @@ edit_uri: 'edit/master/docs/contents'
 
 use_directory_urls: false
 
-# files under docs/ are copied to tmp/
-# with template variables replaced by mustache
-docs_dir: tmp
+docs_dir: contents
 
-pages: 
+nav: 
 - Overview: 'index.md' 
 - Introduction:
     - 'Quick Start': 'introduction/quick-start.md'
@@ -52,3 +50,13 @@ markdown_extensions:
     - codehilite:
         use_pygments: False
     - admonition
+
+plugins:
+    - search
+    - markdownextradata
+        
+extra:
+    GEARPUMP_VERSION: "0.8.5-SNAPSHOT"
+    SCALA_BINARY_VERSION: "2.11"
+    SCALA_VERSION: "2.11.8"
+ 

http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/9ed67a12/docs/version.yml
----------------------------------------------------------------------
diff --git a/docs/version.yml b/docs/version.yml
deleted file mode 100644
index 49ccf57..0000000
--- a/docs/version.yml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-GEARPUMP_VERSION: "0.8.5-SNAPSHOT"
-SCALA_BINARY_VERSION: "2.11"
-SCALA_VERSION: "2.11.8"
----
-

Reply via email to