You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2020/11/11 11:23:41 UTC
[incubator-echarts-doc] branch next updated: specify language of
gallery path in doc.
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts-doc.git
The following commit(s) were added to refs/heads/next by this push:
new 3a2e853 specify language of gallery path in doc.
3a2e853 is described below
commit 3a2e8536e9cbea10678a1c55f090af9e83ee09a8
Author: pissang <bm...@gmail.com>
AuthorDate: Wed Nov 11 19:23:26 2020 +0800
specify language of gallery path in doc.
---
build.js | 6 +++++-
config/env.asf.js | 4 ++--
config/env.dev.js | 4 ++--
config/env.localsite.js | 4 ++--
4 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/build.js b/build.js
index 061de4e..6915602 100644
--- a/build.js
+++ b/build.js
@@ -65,9 +65,13 @@ for (let key in config) {
}
async function md2jsonAsync(opt) {
+
var newOpt = Object.assign({
path: path.join(opt.language, opt.entry, '**/*.md'),
- tplEnv: config,
+ tplEnv: Object.assign({}, config, {
+ galleryViewPath: config.galleryViewPath.replace('${lang}', opt.language),
+ galleryEditorPath: config.galleryEditorPath.replace('${lang}', opt.language)
+ }),
imageRoot: config.imagePath
}, opt);
diff --git a/config/env.asf.js b/config/env.asf.js
index 479fca7..0247c08 100644
--- a/config/env.asf.js
+++ b/config/env.asf.js
@@ -1,8 +1,8 @@
const path = require('path');
module.exports = {
- galleryViewPath: 'https://echarts.apache.org/next/examples/view.html?c=',
- galleryEditorPath: 'https://echarts.apache.org/next/examples/editor.html?c=',
+ galleryViewPath: 'https://echarts.apache.org/next/examples/${lang}/view.html?c=',
+ galleryEditorPath: 'https://echarts.apache.org/next/examples/${lang}/editor.html?c=',
websitePath: 'https://echarts.apache.org',
imagePath: 'asset/img/',
diff --git a/config/env.dev.js b/config/env.dev.js
index ccab99b..27cd565 100644
--- a/config/env.dev.js
+++ b/config/env.dev.js
@@ -1,8 +1,8 @@
const path = require('path');
module.exports = {
- galleryViewPath: 'http://localhost/incubator-echarts-website/next/examples/view.html?c=',
- galleryEditorPath: 'http://localhost/incubator-echarts-website/next/examples/editor.html?c=',
+ galleryViewPath: 'http://localhost/incubator-echarts-website/next/examples/${lang}/view.html?c=',
+ galleryEditorPath: 'http://localhost/incubator-echarts-website/next/examples/${lang}/editor.html?c=',
websitePath: 'http://localhost/incubator-echarts-website',
diff --git a/config/env.localsite.js b/config/env.localsite.js
index 4070e38..aff08fe 100644
--- a/config/env.localsite.js
+++ b/config/env.localsite.js
@@ -1,8 +1,8 @@
const path = require('path');
module.exports = {
- galleryViewPath: 'http://localhost/incubator-echarts-website/next/examples/view.html?c=',
- galleryEditorPath: 'http://localhost/incubator-echarts-website/next/examples/editor.html?c=',
+ galleryViewPath: 'http://localhost/incubator-echarts-website/next/examples/${lang}/view.html?c=',
+ galleryEditorPath: 'http://localhost/incubator-echarts-website/next/examples/${lang}/editor.html?c=',
websitePath: './',
imagePath: 'asset/img/',
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org