diff --git a/auto/train.sh b/auto/train.sh new file mode 100644 index 00000000..e2e9de96 --- /dev/null +++ b/auto/train.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +DEST_DIR=~/Downloads/train && mkdir -p $DEST_DIR && echo "Create dest dir $DEST_DIR" +if [[ $? -ne 0 ]]; then echo "Failed to create dir $DEST_DIR"; exit 1; fi + +SRC_DIR=$(pwd)/for-writers && (cd $SRC_DIR) && echo "Use source dir $SRC_DIR" +if [[ $? -ne 0 ]]; then echo "Failed to use dir $SRC_DIR"; exit 1; fi + +echo '' > $DEST_DIR/page.md && echo "Remove $DEST_DIR/page.md" && +cat $SRC_DIR/pages/contact-*en.md >> $DEST_DIR/page.md && echo "Copy contact to $DEST_DIR" && +cat $SRC_DIR/pages/faq-*en.md >> $DEST_DIR/page.md && echo "Copy faq to $DEST_DIR" && +cat $SRC_DIR/pages/how-to-*en.md >> $DEST_DIR/page.md && echo "Copy how-to to $DEST_DIR" && +cat $SRC_DIR/pages/product-*en.md >> $DEST_DIR/page.md && echo "Copy product to $DEST_DIR" && +cat $SRC_DIR/pages/license-*en.md >> $DEST_DIR/page.md && echo "Copy license to $DEST_DIR" && +cat $SRC_DIR/pages/security-*en.md >> $DEST_DIR/page.md && echo "Copy security to $DEST_DIR" && +echo "Copy all pages to $DEST_DIR/page.md ok" +if [[ $? -ne 0 ]]; then echo "Failed to copy all pages to $DEST_DIR/page.md"; exit 1; fi + +echo '' > $DEST_DIR/blog.md && echo "Remove $DEST_DIR/blog.md" && +cat $SRC_DIR/blog-en/*.md >> $DEST_DIR/blog.md && echo "Copy all blogs to $DEST_DIR/blog.md ok" +if [[ $? -ne 0 ]]; then echo "Failed to copy all blogs to $DEST_DIR/blog.md"; exit 1; fi + +echo '' > $DEST_DIR/doc.md && echo "Remove $DEST_DIR/doc.md" && +cat $SRC_DIR/doc-en-7.0/doc/*.md >> $DEST_DIR/doc.md && echo "Copy all docs to $DEST_DIR/doc.md ok" +if [[ $? -ne 0 ]]; then echo "Failed to copy all docs to $DEST_DIR/doc.md"; exit 1; fi + +echo "" +echo "Done" +echo "" diff --git a/i18n/en-us/code.json b/i18n/en-us/code.json index 23bee064..effc5dcf 100644 --- a/i18n/en-us/code.json +++ b/i18n/en-us/code.json @@ -204,6 +204,9 @@ "homepage.getStarted": { "message": "Get Started" }, + "homepage.askAI": { + "message": "Ask AI" + }, "homepage.cloudService": { "message": "Cloud Service" }, diff --git a/i18n/zh-cn/code.json b/i18n/zh-cn/code.json index 4e7c4bd6..8d562c6b 100644 --- a/i18n/zh-cn/code.json +++ b/i18n/zh-cn/code.json @@ -204,6 +204,9 @@ "homepage.getStarted": { "message": "快速开始" }, + "homepage.askAI": { + "message": "AI助手" + }, "homepage.cloudService": { "message": "云服务" }, diff --git a/src/pages/index.js b/src/pages/index.js index 8ac9a102..c8c3f55f 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -22,6 +22,9 @@ function HomepageHeader() {
{translate({id: 'homepage.getStarted'})} +   + + {translate({id: 'homepage.askAI'})}