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

bzp2010 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-website.git


The following commit(s) were added to refs/heads/master by this push:
     new dad837dead6 docs: update README (#1219)
dad837dead6 is described below

commit dad837dead632d6b8f5dd692eba2d13403014f29
Author: Young <[email protected]>
AuthorDate: Mon Jul 18 15:31:27 2022 +0800

    docs: update README (#1219)
---
 README.md    | 26 ++++++++++++++++++++------
 package.json |  9 ++++++---
 2 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/README.md b/README.md
index 015a8028740..9f4dad32db8 100644
--- a/README.md
+++ b/README.md
@@ -8,6 +8,7 @@ The website of <a 
href="https://github.com/apache/apisix/";>Apache APISIX®</a>
 A cloud-native microservices API Gateway
 
 <a href="https://apisix.apache.org/docs/general/join";><img  width="150" 
src="./website/static/img/join-slack.png"></a>
+
 </div>
 
 <br>
@@ -44,20 +45,31 @@ yarn
 
 # 3. sync docs and generate repos info
 yarn sync-doc && yarn generate-repos-info
+# or
+yarn prepare-data
 
-# 4. start dev mode
-yarn start
+# 4. start website's docs part in dev mode
+yarn start:docs
+# English Blog
+yarn start:blog:en
+# Chinese Blog
+yarn start:blog:zh
 
 # tip.
-# in development mode, only English site will be built
+# in dev, only English docs  will be built
 # it's a feature of docusaurus
 # if you want to specify the locale,
 # for example, Chinese, your should run
-yarn start --locale zh
+yarn start:docs --locale zh
 
 # tip.
 # if you want to preview the same site as online
-yarn build && yarn serve
+preview=true yarn build
+# or
+yarn build:preview
+
+# tip:
+# You can see all the commands you can run in package.json
 ```
 
 Next, you can modify the documentation or code, commit it and push it to 
GitHub when you're done. If you're not familiar with this, you can read [GitHub 
flow](https://docs.github.com/en/get-started/quickstart/github-flow) first.
@@ -78,9 +90,11 @@ apisix-website
 │   └── workflows # for GitHub CI, with steps to actually build the site
 ├── .husky # git hooks, currently only pre-commit is used
 ├── scripts # scripts to help build the site
+├── blog
+    ├── en
+    └── zh
 └── website # docusaurus
     ├── articles
-    ├── blog
     ├── config # are imported in scripts and docusaurus.config.js
     ├── docs
     │   └── general # https://apisix.apache.org/docs/general/join
diff --git a/package.json b/package.json
index 512303b828f..f9a6883fcac 100644
--- a/package.json
+++ b/package.json
@@ -12,14 +12,17 @@
     "sync-doc": "yarn workspace scripts sync",
     "generate-repos-info": "yarn workspace scripts generate-repos-info",
     "update-sitemap": "yarn workspace scripts update-sitemap",
-    "start": "yarn workspace website start",
+    "start:docs": "yarn workspace website start",
+    "start:blog:zh": "yarn workspace blog start:zh",
+    "start:blog:en": "yarn workspace blog start:en",
     "build": "yarn workspace scripts generate-website",
     "build:docs": "yarn workspace website build",
     "build:blog:zh": "yarn workspace blog build:zh",
     "build:blog:en": "yarn workspace blog build:en",
     "build:preview": "preview=true yarn run build",
-    "docusaurus": "yarn workspace website docusaurus",
-    "serve": "yarn docusaurus serve",
+    "serve:docs": "yarn workspace website docusaurus serve",
+    "serve:blog:zh": "yarn workspace blog docusaurus serve zh",
+    "serve:blog:en": "yarn workspace blog docusaurus serve en",
     "prepare": "husky install",
     "prepare-data": "yarn sync-doc && yarn generate-repos-info"
   },

Reply via email to