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

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


The following commit(s) were added to refs/heads/master by this push:
     new 0b8239e3062 Derive doc localPath from link field instead of version, 
allowing version to contain display names with special characters like 
parentheses.
0b8239e3062 is described below

commit 0b8239e30624f0ef9c5f9c317bbd59d7ba5f0c1b
Author: Wu Sheng <[email protected]>
AuthorDate: Tue Mar 24 09:11:06 2026 +0800

    Derive doc localPath from link field instead of version, allowing version 
to contain display names with special characters like parentheses.
    
    - Fix skywalking-python v1.2.0 link pointing to /next/ instead of /v1.2.0/
    - Quote shell arguments in doc.sh execSync call
---
 data/docs.yml |  4 ++--
 docs.js       | 11 ++++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/data/docs.yml b/data/docs.yml
index 25cdf44f191..666a562d20d 100644
--- a/data/docs.yml
+++ b/data/docs.yml
@@ -76,7 +76,7 @@
         - version: Latest
           link: /docs/skywalking-graalvm-distro/latest/readme/
           commitId: 5487ed31653fe7a573b0467ae2c4c365204ade5d  
-        - version: v0.2.1
+        - version: v0.2.1 (10.3.0-dev-64a1795)
           link: /docs/skywalking-graalvm-distro/v0.2.1/readme/
           commitId: 5487ed31653fe7a573b0467ae2c4c365204ade5d
     - name: Booster UI
@@ -148,7 +148,7 @@
           link: /docs/skywalking-python/latest/readme/
           commitId: 1f091ee33f51fff91dd53e2bb65a15d932a12f89
         - version: v1.2.0
-          link: /docs/skywalking-python/next/readme/
+          link: /docs/skywalking-python/v1.2.0/readme/
           commitId: 1f091ee33f51fff91dd53e2bb65a15d932a12f89
     - name: NodeJS Agent
       icon: nodejs-agent
diff --git a/docs.js b/docs.js
index 78f0ce70a68..137befb1435 100644
--- a/docs.js
+++ b/docs.js
@@ -147,12 +147,13 @@ async function traverseDocsList(result) {
       for (const doc of item.docs) {
         const {name, repo, repoUrl, docs, description, icon} = item;
         if (!repoUrl) continue;
-        let {version, commitId} = doc;
+        let {version, commitId, link} = doc;
         version = version.toLowerCase();
-        commitId = commitId || version;
         const docName = repo === 'skywalking' ? 'main' : repo;
-        const localPath = `/content/docs/${docName}/${version}`;
-        const menuFileName = `${docName.replace(/\-|\./g, 
'_')}${version.replace(/\-|v|\./g, '_')}`;
+        const localPath = `/content${link.replace(/\/readme\/$/, '')}`;
+        const versionSlug = localPath.split('/').pop();
+        commitId = commitId || versionSlug;
+        const menuFileName = `${docName.replace(/\-|\./g, 
'_')}${versionSlug.replace(/\-|v|\./g, '_')}`;
 
         tpl += `{{ if in .File.Path "${localPath.split('/content/')[1]}" }}
                   <div class="description-wrapper">
@@ -183,7 +184,7 @@ async function traverseDocsList(result) {
                   <div class="commit-id">Commit Id: 
{{.Site.Data.docSidebar.${menuFileName}.commitId}}</div>
                 {{ end }}\n`;
 
-        execSync(`"./doc.sh" ${repo} ${repoUrl} ${commitId} ${localPath} 
${menuFileName}`);
+        execSync(`"./doc.sh" "${repo}" "${repoUrl}" "${commitId}" 
"${localPath}" "${menuFileName}"`);
         const sha = execSync(`git -C ./tmp/${repo} rev-parse HEAD`);
         if(version === NEXT && sha){
           commitId = sha.toString().replace('\n', '');

Reply via email to