diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..7e63862 --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,22 @@ +{ + "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:*)", + "Bash(git push:*)", + "Bash(start:*)", + "Bash(git remote:*)", + "Bash(ssh-keygen:*)", + "Bash(ssh -T git@gitlink.org.cn)", + "Bash(git branch:*)" + ] + } +} diff --git a/.devops/帮助中心.yml b/.devops/gitlink-help-autodeploy.yml similarity index 64% rename from .devops/帮助中心.yml rename to .devops/gitlink-help-autodeploy.yml index e5d6fb8..8174691 100644 --- a/.devops/帮助中心.yml +++ b/.devops/gitlink-help-autodeploy.yml @@ -1,5 +1,5 @@ version: 2 -name: 帮助中心 +name: gitlink-help-autodeploy description: "" global: concurrent: 1 @@ -26,12 +26,14 @@ workflow: name: docker镜像构建 task: docker_image_build@1.6.0 input: - image_name: '"Docker-xfhf"' + docker_username: ((aliyun.aliyun_username)) + docker_password: ((aliyun.aliyun_password)) + image_name: '"crpi-1x701qgqjia2gdeu.cn-chengdu.personal.cr.aliyuncs.com/gitlink-help-center/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: '"."' + workspace: ((git_clone_0.git_path)) image_push: true build_args: '""' needs: @@ -40,10 +42,11 @@ workflow: name: ssh执行命令 task: ssh_cmd@1.1.1 input: - ssh_ip: '""' + 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"' - ssh_cmd: '""' + ssh_cmd: '"/opt/gitlink-deploy/deploy.sh"' needs: - docker_image_build_0 - ref: end 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", 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