You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2019/10/17 13:17:41 UTC

[incubator-echarts-doc] branch master updated: Add global var and doc tips.

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

sushuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-echarts-doc.git


The following commit(s) were added to refs/heads/master by this push:
     new b5e514b  Add global var and doc tips.
b5e514b is described below

commit b5e514b67bee228c9d73ba2e1bef234dd3d2fbdd
Author: SHUANG SU <su...@gmail.com>
AuthorDate: Thu Oct 17 20:58:52 2019 +0800

    Add global var and doc tips.
---
 README.md               | 21 +++++++++++++++++++++
 config/env.asf.js       |  3 ++-
 config/env.dev.js       |  2 ++
 config/env.echartsjs.js |  3 ++-
 config/env.github.js    |  2 ++
 5 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 8398843..ecf983e 100644
--- a/README.md
+++ b/README.md
@@ -26,3 +26,24 @@ node server.js
 
 Release:
 Check `incubator-echarts-website/README.md` please.
+
+## Tips about writing doc
+
+**Global variables can be used in doc:**
+
++ galleryViewPath
++ galleryEditorPath
++ websitePath
+
+For example:
+```md
+~[700x300](${galleryViewPath}doc-example/aria-pie&edit=1&reset=1)
+```
+
+**Reference of option**
+
+A `~` can be used to refer to a option item in the same doc. For example:
+
+```md
+[xAxis.name](~xAxis.name)
+```
diff --git a/config/env.asf.js b/config/env.asf.js
index dfce451..eb771bc 100644
--- a/config/env.asf.js
+++ b/config/env.asf.js
@@ -1,8 +1,9 @@
 module.exports = {
     galleryViewPath: 'https://echarts.apache.org/examples/zh/view.html?c=',
     galleryEditorPath: 'https://echarts.apache.org/examples/zh/editor.html?c=',
-    imagePath: 'asset/img/',
+    websitePath: 'https://echarts.apache.org',
 
+    imagePath: 'asset/img/',
     gl: {
         imagePath: 'asset/gl/img/',
     }
diff --git a/config/env.dev.js b/config/env.dev.js
index 2d5024c..26494c6 100644
--- a/config/env.dev.js
+++ b/config/env.dev.js
@@ -1,6 +1,8 @@
 module.exports = {
     galleryViewPath: '../../../echarts-examples/public/view.html?c=',
     galleryEditorPath: '../../../echarts-examples/public/editor.html?c=',
+    websitePath: './',
+
     imagePath: 'asset/img/',
     gl: {
         imagePath: 'asset/gl/img/'
diff --git a/config/env.echartsjs.js b/config/env.echartsjs.js
index c96a649..e379b04 100644
--- a/config/env.echartsjs.js
+++ b/config/env.echartsjs.js
@@ -1,8 +1,9 @@
 module.exports = {
     galleryViewPath: 'https://www.echartsjs.com/examples/en/view.html?c=',
     galleryEditorPath: 'https://www.echartsjs.com/examples/en/editor.html?c=',
-    imagePath: 'asset/img/',
+    websitePath: 'https://www.echartsjs.com',
 
+    imagePath: 'asset/img/',
     gl: {
         imagePath: 'asset/gl/img/',
     }
diff --git a/config/env.github.js b/config/env.github.js
index 85b6b9a..77b65aa 100644
--- a/config/env.github.js
+++ b/config/env.github.js
@@ -1,6 +1,8 @@
 module.exports = {
     galleryViewPath: 'https://ecomfe.github.io/echarts-examples/public/view.html?c=',
     galleryEditorPath: 'https://ecomfe.github.io/echarts-examples/public/editor.html?c=',
+    websitePath: 'https://ecomfe.github.io',
+
     imagePath: 'asset/img/',
     gl: {
         imagePath: 'asset/gl/img/'


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