From 00026e3698706f5cc6cc4b95bc01b4e90e12b592 Mon Sep 17 00:00:00 2001 From: luckyasme <807254037@qq.com> Date: Thu, 4 Sep 2025 16:29:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96website=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E5=AD=98=E6=94=BE=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/merge.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/merge.js b/scripts/merge.js index c6dad2c..b9ac6f7 100644 --- a/scripts/merge.js +++ b/scripts/merge.js @@ -65,7 +65,7 @@ function replaceOrgDomain(targetPath) { } // 增加旧版本转发 -function replaceCommonNginxRedirect(branchName) { +function replaceCommonNginxRedirect(buildPath, branchName) { try { const rewrites = []; const lines = fs.readFileSync(`${REPO_DOCS_DIR}/_redirect.yaml`, 'utf8').split('\n'); @@ -184,8 +184,8 @@ const copyContentToDir = (originDir, destDir) => { const normalizeContent = async (buildPath, branch) => { const branchName = getBranchName(branch); - // 复制website-v2内容到build目录 - await copyContentToDir(path.join(REPO_DIR, 'website-v2'), buildPath); + // 复制website-vitepress内容到build目录 + await copyContentToDir(path.join(REPO_DIR, 'website-vitepress'), buildPath); if (branchName == `common`) { // 如果是公共分支,删掉nginx.conf并将nginx.portal.conf重命名为nginx.conf @@ -267,7 +267,7 @@ const normalizeContent = async (buildPath, branch) => { // 增加重定向 if (fs.existsSync(`${REPO_DOCS_DIR}/_redirect.yaml`)) { - replaceCommonNginxRedirect(branchName); + replaceCommonNginxRedirect(buildPath, branchName); } }; @@ -280,8 +280,8 @@ const normalizeContent = async (buildPath, branch) => { const normalizeContentWithHugo = async (buildPath, branch, source) => { const branchName = getBranchName(branch); - // 复制website内容到build目录 - await copyContentToDir(path.join(REPO_DIR, 'website'), buildPath); + // 复制website-hugo内容到build目录 + await copyContentToDir(path.join(REPO_DIR, 'website-hugo'), buildPath); let hugoConf = fs.readFileSync(`${buildPath}/config.toml`, 'utf8'); -- Gitee