From 640dac5ecd9ea38767561b235b8fc457f1e605e9 Mon Sep 17 00:00:00 2001 From: zzx-coder Date: Tue, 12 May 2026 19:29:11 +0800 Subject: [PATCH 01/12] =?UTF-8?q?refactor:=20delete=20.devops/=E5=B8=AE?= =?UTF-8?q?=E5=8A=A9=E4=B8=AD=E5=BF=83.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devops/帮助中心.yml | 54 ---------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 .devops/帮助中心.yml diff --git a/.devops/帮助中心.yml b/.devops/帮助中心.yml deleted file mode 100644 index e5d6fb8..0000000 --- a/.devops/帮助中心.yml +++ /dev/null @@ -1,54 +0,0 @@ -version: 2 -name: 帮助中心 -description: "" -global: - concurrent: 1 -trigger: - webhook: gitlink@1.0.0 - event: - - ref: push - ruleset-operator: AND -workflow: - - ref: start - name: 开始 - task: start - - ref: git_clone_0 - name: git clone - task: git_clone@1.2.9 - input: - remote_url: '"https://gitlink.org.cn/zzx-coder/gitlink_help_center.git"' - ref: '"refs/heads/master"' - commit_id: '""' - depth: 1 - needs: - - start - - ref: docker_image_build_0 - name: docker镜像构建 - task: docker_image_build@1.6.0 - input: - image_name: '"Docker-xfhf"' - image_tag: '"latest"' - registry_address: '""' - docker_file: '"Dockerfile"' - docker_build_path: '"."' - workspace: '"."' - image_push: true - build_args: '""' - needs: - - git_clone_0 - - ref: ssh_cmd_0 - name: ssh执行命令 - task: ssh_cmd@1.1.1 - input: - ssh_ip: '""' - ssh_port: '"22"' - ssh_user: '"root"' - ssh_cmd: '""' - needs: - - docker_image_build_0 - - ref: end - name: 结束 - task: end - needs: - - ssh_cmd_0 - -- 2.34.1 From 5e697cbb51785bd025555441680093d21259b8d6 Mon Sep 17 00:00:00 2001 From: zzx-coder Date: Tue, 12 May 2026 19:29:12 +0800 Subject: [PATCH 02/12] feat: .devops/gitlink-help-autodeploy.yml --- .devops/gitlink-help-autodeploy.yml | 57 +++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .devops/gitlink-help-autodeploy.yml diff --git a/.devops/gitlink-help-autodeploy.yml b/.devops/gitlink-help-autodeploy.yml new file mode 100644 index 0000000..8f92d00 --- /dev/null +++ b/.devops/gitlink-help-autodeploy.yml @@ -0,0 +1,57 @@ +version: 2 +name: gitlink-help-autodeploy +description: "" +global: + concurrent: 1 +trigger: + webhook: gitlink@1.0.0 + event: + - ref: push + ruleset-operator: AND +workflow: + - ref: start + name: 开始 + task: start + - ref: git_clone_0 + name: git clone + task: git_clone@1.2.9 + input: + remote_url: '"https://gitlink.org.cn/zzx-coder/gitlink_help_center.git"' + ref: '"refs/heads/master"' + commit_id: '""' + depth: 1 + needs: + - start + - ref: docker_image_build_0 + name: docker镜像构建 + task: docker_image_build@1.6.0 + input: + docker_username: ((dockerhub.aliyun_username)) + docker_password: ((dockerhub.aliyun_password)) + image_name: '"gitlink-help-center"' + image_tag: '"latest"' + registry_address: '""' + docker_file: '"./Dockerfile"' + docker_build_path: '"./"' + workspace: '""' + image_push: true + build_args: '""' + needs: + - git_clone_0 + - ref: ssh_cmd_0 + name: ssh执行命令 + task: ssh_cmd@1.1.1 + input: + ssh_private_key: ((gitlink_help_center.gitlink_help_center)) + ssh_ip: '"8.137.10.120"' + ssh_port: "22" + ssh_user: '"root"' + ssh_cmd: '"/opt/gitlink-deploy/deploy.sh"' + needs: + - docker_image_build_0 + - ref: end + name: 结束 + task: end + needs: + - ssh_cmd_0 + -- 2.34.1 From 4404ead1c278acd9d4329f3e25119f1e0df35a34 Mon Sep 17 00:00:00 2001 From: zzx-coder Date: Tue, 12 May 2026 19:29:55 +0800 Subject: [PATCH 03/12] refactor: .devops/gitlink-help-autodeploy.yml --- .devops/gitlink-help-autodeploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devops/gitlink-help-autodeploy.yml b/.devops/gitlink-help-autodeploy.yml index 8f92d00..47f73c2 100644 --- a/.devops/gitlink-help-autodeploy.yml +++ b/.devops/gitlink-help-autodeploy.yml @@ -30,7 +30,7 @@ workflow: docker_password: ((dockerhub.aliyun_password)) image_name: '"gitlink-help-center"' image_tag: '"latest"' - registry_address: '""' + registry_address: '"crpi-1x701qgqjia2gdeu.cn-chengdu.personal.cr.aliyuncs.com"' docker_file: '"./Dockerfile"' docker_build_path: '"./"' workspace: '""' -- 2.34.1 From 5603bde83c8806cd8d808a15e087c0fd616fcf88 Mon Sep 17 00:00:00 2001 From: zzx-coder Date: Tue, 12 May 2026 19:44:35 +0800 Subject: [PATCH 04/12] refactor: .devops/gitlink-help-autodeploy.yml --- .devops/gitlink-help-autodeploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devops/gitlink-help-autodeploy.yml b/.devops/gitlink-help-autodeploy.yml index 47f73c2..b42dd0c 100644 --- a/.devops/gitlink-help-autodeploy.yml +++ b/.devops/gitlink-help-autodeploy.yml @@ -43,8 +43,8 @@ workflow: task: ssh_cmd@1.1.1 input: ssh_private_key: ((gitlink_help_center.gitlink_help_center)) - ssh_ip: '"8.137.10.120"' - ssh_port: "22" + ssh_ip: '"121.41.222.0"' + ssh_port: '"22"' ssh_user: '"root"' ssh_cmd: '"/opt/gitlink-deploy/deploy.sh"' needs: -- 2.34.1 From a7cda42e59b10b3425d2ef612d8f26162558b6df Mon Sep 17 00:00:00 2001 From: zzx-coder Date: Tue, 12 May 2026 20:03:44 +0800 Subject: [PATCH 05/12] refactor: .devops/gitlink-help-autodeploy.yml --- .devops/gitlink-help-autodeploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devops/gitlink-help-autodeploy.yml b/.devops/gitlink-help-autodeploy.yml index b42dd0c..d08dfd6 100644 --- a/.devops/gitlink-help-autodeploy.yml +++ b/.devops/gitlink-help-autodeploy.yml @@ -26,8 +26,8 @@ workflow: name: docker镜像构建 task: docker_image_build@1.6.0 input: - docker_username: ((dockerhub.aliyun_username)) - docker_password: ((dockerhub.aliyun_password)) + docker_username: ((aliyun.aliyun_username)) + docker_password: ((aliyun.aliyun_password)) image_name: '"gitlink-help-center"' image_tag: '"latest"' registry_address: '"crpi-1x701qgqjia2gdeu.cn-chengdu.personal.cr.aliyuncs.com"' -- 2.34.1 From 2108ec3e3bbe45b5d660d4ebd4e3654d6d18d050 Mon Sep 17 00:00:00 2001 From: zzx-coder Date: Tue, 12 May 2026 20:03:52 +0800 Subject: [PATCH 06/12] refactor: .devops/gitlink-help-autodeploy.yml --- .devops/gitlink-help-autodeploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devops/gitlink-help-autodeploy.yml b/.devops/gitlink-help-autodeploy.yml index d08dfd6..20f668a 100644 --- a/.devops/gitlink-help-autodeploy.yml +++ b/.devops/gitlink-help-autodeploy.yml @@ -42,7 +42,7 @@ workflow: name: ssh执行命令 task: ssh_cmd@1.1.1 input: - ssh_private_key: ((gitlink_help_center.gitlink_help_center)) + ssh_private_key: ((gitlink_help_center_ssh_key.gitlink_help_center_ssh_key)) ssh_ip: '"121.41.222.0"' ssh_port: '"22"' ssh_user: '"root"' -- 2.34.1 From 79db184e3ec09508c878454694ab8b9be30c57aa Mon Sep 17 00:00:00 2001 From: zzx-coder Date: Tue, 12 May 2026 20:07:13 +0800 Subject: [PATCH 07/12] refactor: .devops/gitlink-help-autodeploy.yml --- .devops/gitlink-help-autodeploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devops/gitlink-help-autodeploy.yml b/.devops/gitlink-help-autodeploy.yml index 20f668a..7146eda 100644 --- a/.devops/gitlink-help-autodeploy.yml +++ b/.devops/gitlink-help-autodeploy.yml @@ -28,11 +28,11 @@ workflow: input: docker_username: ((aliyun.aliyun_username)) docker_password: ((aliyun.aliyun_password)) - image_name: '"gitlink-help-center"' + image_name: '"crpi-1x701qgqjia2gdeu.cn-chengdu.personal.cr.aliyuncs.com/gitlink-help-center/gitlink-help-center"' image_tag: '"latest"' registry_address: '"crpi-1x701qgqjia2gdeu.cn-chengdu.personal.cr.aliyuncs.com"' - docker_file: '"./Dockerfile"' - docker_build_path: '"./"' + docker_file: '"Dockerfile"' + docker_build_path: '"."' workspace: '""' image_push: true build_args: '""' -- 2.34.1 From eb7eec5c5678bf564c6d6094c1cc553d30a0d2fa Mon Sep 17 00:00:00 2001 From: zzx-coder Date: Tue, 12 May 2026 20:45:16 +0800 Subject: [PATCH 09/12] refactor: .devops/gitlink-help-autodeploy.yml --- .devops/gitlink-help-autodeploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devops/gitlink-help-autodeploy.yml b/.devops/gitlink-help-autodeploy.yml index 7146eda..fab6602 100644 --- a/.devops/gitlink-help-autodeploy.yml +++ b/.devops/gitlink-help-autodeploy.yml @@ -35,7 +35,7 @@ workflow: docker_build_path: '"."' workspace: '""' image_push: true - build_args: '""' + build_args: ((git_clone_0.git_path)) needs: - git_clone_0 - ref: ssh_cmd_0 -- 2.34.1 From 1da78bc2de98785cce0040e131bc639300e8a5ad Mon Sep 17 00:00:00 2001 From: zzx-coder Date: Tue, 12 May 2026 20:45:33 +0800 Subject: [PATCH 10/12] refactor: .devops/gitlink-help-autodeploy.yml --- .devops/gitlink-help-autodeploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devops/gitlink-help-autodeploy.yml b/.devops/gitlink-help-autodeploy.yml index fab6602..8174691 100644 --- a/.devops/gitlink-help-autodeploy.yml +++ b/.devops/gitlink-help-autodeploy.yml @@ -33,9 +33,9 @@ workflow: registry_address: '"crpi-1x701qgqjia2gdeu.cn-chengdu.personal.cr.aliyuncs.com"' docker_file: '"Dockerfile"' docker_build_path: '"."' - workspace: '""' + workspace: ((git_clone_0.git_path)) image_push: true - build_args: ((git_clone_0.git_path)) + build_args: '""' needs: - git_clone_0 - ref: ssh_cmd_0 -- 2.34.1 From 30aa2573e86d10dc7379d8f094b54b182f4957a2 Mon Sep 17 00:00:00 2001 From: Donkey_kevin <2930705585@qq.com> Date: Tue, 12 May 2026 15:37:17 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E5=90=88=E5=B9=B6=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=B0=E8=BF=9C=E7=A8=8B=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/settings.local.json | 16 ++++++++++++++ Dockerfile | 43 +++++-------------------------------- docusaurus.config.js | 33 ++++++++++++++-------------- gitlink_help_center | 1 + package-lock.json | 27 +++-------------------- 5 files changed, 41 insertions(+), 79 deletions(-) create mode 100644 .claude/settings.local.json create mode 160000 gitlink_help_center diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..a015b80 --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,16 @@ +{ + "permissions": { + "allow": [ + "Bash(npm run:*)", + "Bash(npm install:*)", + "Bash(netstat -ano)", + "Bash(powershell -Command \"Get-NetTCPConnection -LocalPort 3000 -ErrorAction SilentlyContinue | Select-Object LocalPort, State\")", + "Bash(findstr \":3000\")", + "Bash(findstr \"LISTENING\")", + "Bash(git config:*)", + "Bash(git fetch:*)", + "Bash(git add:*)", + "Bash(git commit:*)" + ] + } +} diff --git a/Dockerfile b/Dockerfile index 597e466..09b6efe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,43 +1,10 @@ -FROM crpi-1x701qgqjia2gdeu.cn-chengdu.personal.cr.aliyuncs.com/gitlink-help-center/gitlink-help-center:node-20-alpine +FROM node:18-alpine LABEL maintainer="yuankaifneg <2894340009@qq.com>" -# 设置为root用户以安装系统依赖 -USER root +WORKDIR /gitlink_help_center -# 安装必要的系统依赖 -RUN yum install -y \ - git \ - python3 \ - make \ - gcc-c++ \ - bash && \ - yum clean all +COPY ./ /gitlink_help_center/ -# 设置工作目录 -WORKDIR /app - -# 优先复制package.json和package-lock.json以利用Docker缓存 -COPY package.json package-lock.json ./ - -# 安装依赖(忽略peer依赖冲突) -RUN npm install --legacy-peer-deps - -# 复制项目文件 -COPY . . - -# 构建应用 -RUN npm run build - -# 暴露端口 -EXPOSE 3000 - -# 设置环境变量 -ENV NODE_ENV=production -ENV PORT=3000 - -# 健康检查 -HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \ - CMD node -e "require('http').get('http://localhost:3000', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})" - -# 启动应用 +RUN yarn install +RUN npm run build -- --locale zh-cn CMD ["npm", "run", "serve"] diff --git a/docusaurus.config.js b/docusaurus.config.js index c1a620d..424ef17 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -185,23 +185,22 @@ module.exports = { ], themes: [ // ... Your other themes. - // Local search plugin temporarily disabled due to compatibility issues with Docusaurus 3.9.2 - // [ - // require.resolve("@easyops-cn/docusaurus-search-local"), - // { - // // ... Your options. - // // `hashed` is recommended as long-term-cache of index file is possible. - // hashed: true, - // language: ["en", "zh"], - // highlightSearchTermsOnTargetPage: true, - // blogRouteBasePath: "/", - // explicitSearchResultPath: true, - // // For Docs using Chinese, The `language` is recommended to set to: - // // ``` - // // language: ["en", "zh"], - // // ``` - // }, - // ], + [ + require.resolve("@easyops-cn/docusaurus-search-local"), + { + // ... Your options. + // `hashed` is recommended as long-term-cache of index file is possible. + hashed: true, + language: ["en", "zh"], + highlightSearchTermsOnTargetPage: true, + blogRouteBasePath: "/", + explicitSearchResultPath: true, + // For Docs using Chinese, The `language` is recommended to set to: + // ``` + // language: ["en", "zh"], + // ``` + }, + ], ], i18n: { defaultLocale: 'zh-cn', diff --git a/gitlink_help_center b/gitlink_help_center new file mode 160000 index 0000000..2936750 --- /dev/null +++ b/gitlink_help_center @@ -0,0 +1 @@ +Subproject commit 293675001acfe7c74caa0bcf78765ec29034c715 diff --git a/package-lock.json b/package-lock.json index d3f4f45..e919ab2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "docusaurus", - "version": "0.0.0", + "version": "3.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "docusaurus", - "version": "0.0.0", + "version": "3.0.0", "dependencies": { "@cmfcmf/docusaurus-search-local": "1.1.0", "@docusaurus/core": "3.9.2", @@ -26,7 +26,7 @@ "react-modal": "3.16.1" }, "engines": { - "node": ">=14.18.1 <=18.x" + "node": ">=18.x" } }, "node_modules/@algolia/abtesting": { @@ -19901,13 +19901,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/search-insights": { - "version": "2.17.3", - "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.17.3.tgz", - "integrity": "sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ==", - "license": "MIT", - "peer": true - }, "node_modules/section-matter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", @@ -20994,20 +20987,6 @@ "is-typedarray": "^1.0.0" } }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "license": "Apache-2.0", - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/undici": { "version": "7.22.0", "resolved": "https://registry.npmjs.org/undici/-/undici-7.22.0.tgz", -- 2.34.1 From ac21ca3e6750d0ab62a8f6e118de080aadf74452 Mon Sep 17 00:00:00 2001 From: Donkey_kevin <2930705585@qq.com> Date: Tue, 12 May 2026 15:49:11 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/settings.local.json | 8 +++++++- src/css/custom.css | 11 +++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index a015b80..7e63862 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -10,7 +10,13 @@ "Bash(git config:*)", "Bash(git fetch:*)", "Bash(git add:*)", - "Bash(git commit:*)" + "Bash(git commit:*)", + "Bash(git push:*)", + "Bash(start:*)", + "Bash(git remote:*)", + "Bash(ssh-keygen:*)", + "Bash(ssh -T git@gitlink.org.cn)", + "Bash(git branch:*)" ] } } diff --git a/src/css/custom.css b/src/css/custom.css index 01ab68e..66c18c0 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -148,4 +148,15 @@ html[data-theme='dark'] .docusaurus-highlight-code-line { .widget{ display: none!important; opacity: 0; +} +/* 帮助文档卡片背景 */ +.cardContainer { + background-color: #e6f0ff !important; + border-radius: 12px; + transition: all 0.3s ease; +} + +.cardContainer:hover { + background-color: #cce0ff !important; + box-shadow: 0 4px 12px rgba(70, 106, 255, 0.15); } \ No newline at end of file -- 2.34.1