You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by xi...@apache.org on 2023/02/06 03:21:52 UTC

[incubator-eventmesh-site] branch master updated: feat: update the 'fetch' script and README.md

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

xiaoyang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 90e58bd5 feat: update the 'fetch' script and README.md
90e58bd5 is described below

commit 90e58bd5be7e3099419e2eb790fc9319a22cc2d1
Author: Xiaoyang Liu <si...@gmail.com>
AuthorDate: Sun Feb 5 19:20:10 2023 -0800

    feat: update the 'fetch' script and README.md
    
    Signed-off-by: Xiaoyang Liu <si...@gmail.com>
---
 README.md        | 39 +++++++++++++++++++++++++++++++++++++++
 scripts/fetch.ts |  2 +-
 2 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 32137761..22949956 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,40 @@
 # Apache EventMesh (Incubating) Website
+
+## Development
+
+Clone and install dependencies:
+
+```sh
+git clone git@github.com:apache/incubator-eventmesh-site.git
+cd incubator-eventmesh-site
+
+npm install
+```
+
+Preview the website in development mode:
+
+```sh
+# Start the website with English documentations
+npm run start -- --locale en
+
+# Start the website with Chinese documentations
+npm run start -- --locale zh
+```
+
+Build and view the website:
+
+```sh
+npm run build
+
+npm run serve
+```
+
+## Sync Documentation from `apache/incubator-eventmesh`
+
+The `npm run fetch` script (`scripts/fetch.ts`) clones the `apache/incubator-eventmesh` repository and copies the documentations to `docs` and `i18n/zh/docusaurus-plugin-content-docs`. To update the documentation, please create a pull request in the `apache/incubator-eventmesh` repository.
+
+```sh
+npm run fetch
+
+npm run start -- --locale en
+```
diff --git a/scripts/fetch.ts b/scripts/fetch.ts
index 8307c84a..f87f1a76 100644
--- a/scripts/fetch.ts
+++ b/scripts/fetch.ts
@@ -3,7 +3,7 @@ import path from 'path';
 import simpleGit from 'simple-git';
 
 const rewriteMarkdown = (file: string) => {
-  const content = fs.readFileSync(file, 'utf-8');
+  const content = fs.readFileSync(file, 'utf-8').replace(/]\(.*images\//g, '](/images/');
   fs.writeFileSync(file, content, 'utf-8');
 };
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org