This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-handbook.git
The following commit(s) were added to refs/heads/master by this push:
new 4dcef0e fix
4dcef0e is described below
commit 4dcef0e2ca84a1e5f15747014a6efbcfa35086cd
Author: plainheart <[email protected]>
AuthorDate: Sun Sep 28 15:55:16 2025 +0800
fix
---
build/generate-contributor-avatar.js | 12 +++++++++++-
components/helper/contributor-avatar.ts | 2 +-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/build/generate-contributor-avatar.js
b/build/generate-contributor-avatar.js
index 32c6cd4..4847b78 100644
--- a/build/generate-contributor-avatar.js
+++ b/build/generate-contributor-avatar.js
@@ -1,9 +1,19 @@
const fs = require('fs')
+const path = require('path')
const fetch = require('node-fetch')
const cheerio = require('cheerio')
;(async () => {
- const html = await (await
fetch('https://echarts.apache.org/en/committers.html')).text()
+ const localFilePath = path.resolve(__dirname,
'../../echarts-www/_generated/en/committers.html')
+ let html
+ if (fs.existsSync(localFilePath)) {
+ console.log('use local built committers page:', localFilePath)
+ html = fs.readFileSync(localFilePath, { encoding: 'utf-8' })
+ } else {
+ const website = 'https://echarts.apache.org/en/committers.html'
+ console.log('fetch committers page from website:', website)
+ html = await (await fetch(website)).text()
+ }
const $ = cheerio.load(html)
/** @type {{[key: string]: string}} */
const githubIdAvatarMap = {}
diff --git a/components/helper/contributor-avatar.ts
b/components/helper/contributor-avatar.ts
index d9393a9..06ac157 100644
--- a/components/helper/contributor-avatar.ts
+++ b/components/helper/contributor-avatar.ts
@@ -2,7 +2,7 @@ export default {
"pissang":
"https://echarts.apache.org/en/images/people/沈毅.jpg?_v_=20240226",
"100pah":
"https://echarts.apache.org/en/images/people/宿爽.jpg?_v_=20240226",
"Ovilia":
"https://echarts.apache.org/en/images/people/羡辙.jpg?_v_=20240226",
- "https":
"https://echarts.apache.org/en/images/people/王俊婷.jpg?_v_=20240226",
+ "Wdingding":
"https://echarts.apache.org/en/images/people/王俊婷.jpg?_v_=20240226",
"plainheart": "https://echarts.apache.org/en/images/people/plainheart.jpg",
"sz-p":
"https://echarts.apache.org/en/images/people/潘士钊.jpg?_v_=20240226.jpg",
"susiwen8":
"https://echarts.apache.org/en/images/people/苏思文.jpg?_v_=20240226",
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]