From ecbaaad060632a75fd8538e7750cc3e3b76cba4f Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Thu, 26 Nov 2026 08:55:18 -0500 Subject: [PATCH 1/8] update project --- .idea/dataSources.xml | 17 ++++++++++++++++ .idea/vcs.xml | 1 + README.md | 8 ++++---- docs/ai/9537-mac.md | 11 +++++++++++ docs/ai/index.md | 3 +++ wrangler.jsonc | 45 +++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 81 insertions(+), 4 deletions(-) create mode 100644 .idea/dataSources.xml create mode 100644 docs/ai/9537-mac.md create mode 100644 docs/ai/index.md create mode 100644 wrangler.jsonc diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml new file mode 100644 index 0000000..9e1b738 --- /dev/null +++ b/.idea/dataSources.xml @@ -0,0 +1,17 @@ + + + + + mariadb + true + org.mariadb.jdbc.Driver + jdbc:mariadb://localhost:3306 + + + + + + $ProjectFileDir$ + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 35eb1dd..8306744 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,5 +2,6 @@ + \ No newline at end of file diff --git a/README.md b/README.md index 259d450..276332c 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ vitepress v2.0.0-alpha.17 |-----------------|----------------------------------------------------|-----------------------------| | iSharkFly - 飞鲨 | https://www.isharkfly.com/c/software-development/5 | 计算机相关的前端框架和讨论 | | TypeScript 文档手册 | https://typescript.ossez.com/ | TypeScript 相关技术文档和手册 | -| Angular 技术手册 | https://angular.ossez.com/ | Angular 手册的在线翻译版本,从源代码中进行编译 | +| Angular 技术手册 | https://angular.isharkfly.com/ | Angular 手册的在线翻译版本,从源代码中进行编译 | | TypeScript 文档手册 | https://typescript.ossez.com/ | TypeScript 相关技术文档和手册 | | Docsify 中文文档手册 | https://docsify.isharkfly.com/ | Docsify 可以快速帮你生成文档网站 | @@ -70,8 +70,8 @@ vitepress v2.0.0-alpha.17 | 网站名称 | URL | NOTE | |------------------------|-----------------------------------|----------------------| -| Apache Druid 技术手册 | https://druid.isharkfly.com/ | Druid 手册的在线翻译版本 | -| Amazon OpenSearch 技术手册 | https://opensearch.isharkfly.com/ | OpenSearch 手册的在线翻译版本 | +| Apache Druid | https://druid.isharkfly.com/ | Druid 手册的在线翻译版本 | +| Amazon OpenSearch | https://opensearch.isharkfly.com/ | OpenSearch 手册的在线翻译版本 | | HAPI FHIR | https://fhir.isharkfly.com/#/ | FHIR 相关技术文档的收集和讨论 | ### 容器 docker @@ -79,4 +79,4 @@ vitepress v2.0.0-alpha.17 | 网站名称 | URL | NOTE | |--------------------|--------------------------------|-------------------------------------------------------------| | Docker 手册中译在线版 | https://docker.ossez.com/ | 基于 Docker 容器英文手册的翻译版本 | -| Docker 手册中译 MD 在线版 | https://docker-docs.ossez.com/ | 因为 Docker 的官方手册进行了渲染,我们推荐你使用上面的链接,这个版本为 docsify 渲染版本,可能会丢格式 | \ No newline at end of file +| Docker 手册中译 MD 在线版 | https://docker-docs.ossez.com/ | 因为 Docker 的官方手册进行了渲染,我们推荐你使用上面的链接,这个版本为 docsify 渲染版本,可能会丢格式 | diff --git a/docs/ai/9537-mac.md b/docs/ai/9537-mac.md new file mode 100644 index 0000000..bfb76e6 --- /dev/null +++ b/docs/ai/9537-mac.md @@ -0,0 +1,11 @@ +# 用 Mac 为国内小伙伴提供算力支持 + +> 🔔 原文:https://www.isharkfly.com/t/mac/9537 + +如果说是用树莓派是丐版配置,那么 Mac mini 就是妥妥的豪华版,是当前能够绕过 KYC 校验的不错选择。 + +![image|666x500](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/optimized/3X/e/b/eb955d0dc776316c869faf669fd27af51456ef38_2_666x500.jpeg) + +网络上充斥了各种不准确的消息,其中核心目的就是用 Mac Mini 获得本地干净 IP 地址,并且把连接放在美国网络上。 + +因为 Mac Mini 是纯 Linux 系统,各种命令都可以玩,性能还不错,部署容器什么的都很方便。 \ No newline at end of file diff --git a/docs/ai/index.md b/docs/ai/index.md new file mode 100644 index 0000000..284cfe9 --- /dev/null +++ b/docs/ai/index.md @@ -0,0 +1,3 @@ +# AI + +- [用 Mac 为国内小伙伴提供算力支持](./9537-mac.md) \ No newline at end of file diff --git a/wrangler.jsonc b/wrangler.jsonc new file mode 100644 index 0000000..b0dcf16 --- /dev/null +++ b/wrangler.jsonc @@ -0,0 +1,45 @@ +{ + "$schema": "./node_modules/wrangler/config-schema.json", + // VitePress 纯静态站点,使用 Cloudflare Workers Static Assets 托管(无 Worker 脚本) + "name": "docs-isharkfly-com", + "compatibility_date": "2026-06-25", + "assets": { + // vitepress build 默认输出目录(相对项目根目录) + "directory": ".vitepress/dist", + // VitePress 会生成 404.html + "not_found_handling": "404-page", + "html_handling": "auto-trailing-slash" + }, + // 允许 PR / 分支通过 versions upload 生成 Preview URL + "preview_urls": true, + + // 原 wrangler.toml 中的可观测性配置 + "observability": { + "enabled": false, + "head_sampling_rate": 1, + "logs": { + "enabled": true, + "head_sampling_rate": 1, + "persist": true, + "invocation_logs": true + }, + "traces": { + "enabled": false, + "persist": true, + "head_sampling_rate": 1 + } + }, + + "env": { + // Tag 构建部署到此环境:Worker 名称为 docs-isharkfly-com-production + "production": { + "assets": { + "directory": ".vitepress/dist", + "not_found_handling": "404-page", + "html_handling": "auto-trailing-slash" + } + // DNS 切换到 Cloudflare 后再启用自定义域名: + // "routes": [{ "pattern": "docs.isharkfly.com", "custom_domain": true }] + } + } +} -- 2.54.0 From 3b28b89c9f942aa5282da6bbeddb97de5b9cf38d Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Thu, 26 Nov 2026 09:39:58 -0500 Subject: [PATCH 2/8] update Links --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 276332c..bcedfc3 100644 --- a/README.md +++ b/README.md @@ -61,10 +61,10 @@ vitepress v2.0.0-alpha.17 | 网站名称 | URL | NOTE | |-----------------|----------------------------------------------------|-----------------------------| | iSharkFly - 飞鲨 | https://www.isharkfly.com/c/software-development/5 | 计算机相关的前端框架和讨论 | -| TypeScript 文档手册 | https://typescript.ossez.com/ | TypeScript 相关技术文档和手册 | -| Angular 技术手册 | https://angular.isharkfly.com/ | Angular 手册的在线翻译版本,从源代码中进行编译 | -| TypeScript 文档手册 | https://typescript.ossez.com/ | TypeScript 相关技术文档和手册 | -| Docsify 中文文档手册 | https://docsify.isharkfly.com/ | Docsify 可以快速帮你生成文档网站 | +| TypeScript | https://typescript.ossez.com/ | TypeScript 相关技术文档和手册 | +| Angular | https://angular.isharkfly.com/ | Angular 手册的在线翻译版本,从源代码中进行编译 | +| TypeScript | https://typescript.ossez.com/ | TypeScript 相关技术文档和手册 | +| Docsify | https://docsify.isharkfly.com/ | Docsify 可以快速帮你生成文档网站 | ### 后端和数据 @@ -80,3 +80,7 @@ vitepress v2.0.0-alpha.17 |--------------------|--------------------------------|-------------------------------------------------------------| | Docker 手册中译在线版 | https://docker.ossez.com/ | 基于 Docker 容器英文手册的翻译版本 | | Docker 手册中译 MD 在线版 | https://docker-docs.ossez.com/ | 因为 Docker 的官方手册进行了渲染,我们推荐你使用上面的链接,这个版本为 docsify 渲染版本,可能会丢格式 | + +## 许可证 + +本项目基于 [MIT License](LICENSE) 许可证开源。 -- 2.54.0 From 406ddd898ff6cd2db9cfb9d87163ce9abb7c8549 Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Thu, 26 Nov 2026 09:56:17 -0500 Subject: [PATCH 3/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/LINKS.md | 33 +++++++++++++++++++++++++++++++++ docs/links.md | 35 ----------------------------------- 2 files changed, 33 insertions(+), 35 deletions(-) create mode 100644 docs/LINKS.md delete mode 100644 docs/links.md diff --git a/docs/LINKS.md b/docs/LINKS.md new file mode 100644 index 0000000..5542639 --- /dev/null +++ b/docs/LINKS.md @@ -0,0 +1,33 @@ +在下面的表格中,我们列出了一些比较有用相关软件开发使用教程的导航,在我们文档的整理中,也参考了一些这些文档。 + +在这里对原作者表示感谢。 + +| 网站名称 | URL | NOTE | GitHub | +|--------------------|----------------------------------------------------------------|---------------------------|--------------------------------------------------------------------------------------------------------------------------| +| DOCS.ISHARKFLY.COM | [https://docs.isharkfly.com/#/](https://docs.isharkfly.com/#/) | 本手册的编译版本将会部署在这个链接上 | [https://src.sharkdat.com/iSharkFly-Docs/docs-isharkfly-com](https://src.sharkdat.com/iSharkFly-Docs/docs-isharkfly-com) | +| WWW.CWIKIUS.CN | [http://www.cwikius.cn/](http://www.cwikius.cn/) | CWIKIUS.CN 一个有独立思考和温度的清新站 | N/A | + +### 前端和 UI + +| 网站名称 | URL | NOTE | +|-----------------|----------------------------------------------------|-----------------------------| +| iSharkFly - 飞鲨 | https://www.isharkfly.com/c/software-development/5 | 计算机相关的前端框架和讨论 | +| TypeScript | https://typescript.ossez.com/ | TypeScript 相关技术文档和手册 | +| Angular | https://angular.isharkfly.com/ | Angular 手册的在线翻译版本,从源代码中进行编译 | +| TypeScript | https://typescript.ossez.com/ | TypeScript 相关技术文档和手册 | +| Docsify | https://docsify.isharkfly.com/ | Docsify 可以快速帮你生成文档网站 | + +### 后端和数据 + +| 网站名称 | URL | NOTE | +|------------------------|-----------------------------------|----------------------| +| Apache Druid | https://druid.isharkfly.com/ | Druid 手册的在线翻译版本 | +| Amazon OpenSearch | https://opensearch.isharkfly.com/ | OpenSearch 手册的在线翻译版本 | +| HAPI FHIR | https://fhir.isharkfly.com/#/ | FHIR 相关技术文档的收集和讨论 | + +### 容器 docker + +| 网站名称 | URL | NOTE | +|--------------------|--------------------------------|-------------------------------------------------------------| +| Docker 手册中译在线版 | https://docker.ossez.com/ | 基于 Docker 容器英文手册的翻译版本 | +| Docker 手册中译 MD 在线版 | https://docker-docs.ossez.com/ | 因为 Docker 的官方手册进行了渲染,我们推荐你使用上面的链接,这个版本为 docsify 渲染版本,可能会丢格式 | diff --git a/docs/links.md b/docs/links.md deleted file mode 100644 index 6fb07ce..0000000 --- a/docs/links.md +++ /dev/null @@ -1,35 +0,0 @@ -在下面的表格中,我们列出了一些比较有用的 iSharkFly 相关软件开发使用教程的导航,欢迎访问下面的链接获得更多的内容和参与讨论 - -在这里对原作者表示感谢。 - - -| 名称及链接 | NOTE | -|---------------------------------------------------|---------------------------| -| [DOCS.ISHARKFLY.COM](https://docs.isharkfly.com/) | 本手册的编译版本将会部署在这个链接上 | -| [CN 博客](http://www.cwikius.cn/) | CWIKIUS.CN 一个有独立思考和温度的清新站 | - - -### 前端和 UI - -| 网站名称 | URL | NOTE | -|-----------------|----------------------------------------------------|-----------------------------| -| iSharkFly - 飞鲨 | https://www.isharkfly.com/c/software-development/5 | 计算机相关的前端框架和讨论 | -| TypeScript 文档手册 | https://typescript.ossez.com/ | TypeScript 相关技术文档和手册 | -| Angular 技术手册 | https://angular.ossez.com/ | Angular 手册的在线翻译版本,从源代码中进行编译 | -| TypeScript 文档手册 | https://typescript.ossez.com/ | TypeScript 相关技术文档和手册 | -| Docsify 中文文档手册 | https://docsify.isharkfly.com/ | Docsify 可以快速帮你生成文档网站 | - -### 后端和数据 - -| 网站名称 | URL | NOTE | -|------------------------|-----------------------------------|----------------------| -| Apache Druid 技术手册 | https://druid.isharkfly.com/ | Druid 手册的在线翻译版本 | -| Amazon OpenSearch 技术手册 | https://opensearch.isharkfly.com/ | OpenSearch 手册的在线翻译版本 | -| HAPI FHIR | https://fhir.isharkfly.com/#/ | FHIR 相关技术文档的收集和讨论 | - -### 容器 docker - -| 网站名称 | URL | NOTE | -|--------------------|--------------------------------|-------------------------------------------------------------| -| Docker 手册中译在线版 | https://docker.ossez.com/ | 基于 Docker 容器英文手册的翻译版本 | -| Docker 手册中译 MD 在线版 | https://docker-docs.ossez.com/ | 因为 Docker 的官方手册进行了渲染,我们推荐你使用上面的链接,这个版本为 docsify 渲染版本,可能会丢格式 | \ No newline at end of file -- 2.54.0 From 1e188006ac217278f0f4e9ae703114db90a6134b Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Thu, 26 Nov 2026 10:08:15 -0500 Subject: [PATCH 4/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E4=BB=A3=E7=A0=81=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/CONTACT.md | 2 -- docs/LINKS.md | 2 ++ docs/index.md | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/CONTACT.md b/docs/CONTACT.md index 7b7aa03..2d14627 100644 --- a/docs/CONTACT.md +++ b/docs/CONTACT.md @@ -20,5 +20,3 @@ ## 知乎 https://www.isharkfly.com/people/huyuchengus -## 快速导航 - diff --git a/docs/LINKS.md b/docs/LINKS.md index 5542639..bd5650a 100644 --- a/docs/LINKS.md +++ b/docs/LINKS.md @@ -1,3 +1,5 @@ +# 快速导航 + 在下面的表格中,我们列出了一些比较有用相关软件开发使用教程的导航,在我们文档的整理中,也参考了一些这些文档。 在这里对原作者表示感谢。 diff --git a/docs/index.md b/docs/index.md index ec62132..9ed1764 100644 --- a/docs/index.md +++ b/docs/index.md @@ -43,4 +43,6 @@ features: --- --- - \ No newline at end of file + + + -- 2.54.0 From 7bbfae395420af2cd2608380380506ea4e9962c4 Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Tue, 1 Dec 2026 12:56:10 -0500 Subject: [PATCH 5/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/LINKS.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/LINKS.md b/docs/LINKS.md index bd5650a..a0cc605 100644 --- a/docs/LINKS.md +++ b/docs/LINKS.md @@ -9,14 +9,14 @@ | DOCS.ISHARKFLY.COM | [https://docs.isharkfly.com/#/](https://docs.isharkfly.com/#/) | 本手册的编译版本将会部署在这个链接上 | [https://src.sharkdat.com/iSharkFly-Docs/docs-isharkfly-com](https://src.sharkdat.com/iSharkFly-Docs/docs-isharkfly-com) | | WWW.CWIKIUS.CN | [http://www.cwikius.cn/](http://www.cwikius.cn/) | CWIKIUS.CN 一个有独立思考和温度的清新站 | N/A | -### 前端和 UI +### 语言和框架 | 网站名称 | URL | NOTE | |-----------------|----------------------------------------------------|-----------------------------| | iSharkFly - 飞鲨 | https://www.isharkfly.com/c/software-development/5 | 计算机相关的前端框架和讨论 | | TypeScript | https://typescript.ossez.com/ | TypeScript 相关技术文档和手册 | +| Mumps | https://mumps.sharkfly.com/ | Mumps 相关技术文档和手册 | | Angular | https://angular.isharkfly.com/ | Angular 手册的在线翻译版本,从源代码中进行编译 | -| TypeScript | https://typescript.ossez.com/ | TypeScript 相关技术文档和手册 | | Docsify | https://docsify.isharkfly.com/ | Docsify 可以快速帮你生成文档网站 | ### 后端和数据 @@ -24,10 +24,10 @@ | 网站名称 | URL | NOTE | |------------------------|-----------------------------------|----------------------| | Apache Druid | https://druid.isharkfly.com/ | Druid 手册的在线翻译版本 | -| Amazon OpenSearch | https://opensearch.isharkfly.com/ | OpenSearch 手册的在线翻译版本 | +| OpenSearch | https://opensearch.isharkfly.com/ | OpenSearch 手册的在线翻译版本 | | HAPI FHIR | https://fhir.isharkfly.com/#/ | FHIR 相关技术文档的收集和讨论 | -### 容器 docker +### docker | 网站名称 | URL | NOTE | |--------------------|--------------------------------|-------------------------------------------------------------| -- 2.54.0 From b787f51814cfad132155b0ed1ee48d9e5adff61d Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Tue, 1 Dec 2026 13:55:20 -0500 Subject: [PATCH 6/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BD=91=E7=AB=99?= =?UTF-8?q?=E5=92=8C=E5=86=85=E5=AE=B9=E7=9A=84=E5=BF=AB=E9=80=9F=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/LINKS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/LINKS.md b/docs/LINKS.md index a0cc605..1edf535 100644 --- a/docs/LINKS.md +++ b/docs/LINKS.md @@ -17,6 +17,7 @@ | TypeScript | https://typescript.ossez.com/ | TypeScript 相关技术文档和手册 | | Mumps | https://mumps.sharkfly.com/ | Mumps 相关技术文档和手册 | | Angular | https://angular.isharkfly.com/ | Angular 手册的在线翻译版本,从源代码中进行编译 | +| Composer | https://composer.isharkfly.com/ | Composer 简体中文版本 | | Docsify | https://docsify.isharkfly.com/ | Docsify 可以快速帮你生成文档网站 | ### 后端和数据 -- 2.54.0 From b1c6a3b6bf8df643e6939bbdd26e946d9c03cf13 Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Wed, 2 Dec 2026 09:24:12 -0500 Subject: [PATCH 7/8] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vitepress/config.mts | 345 +++++++++++++++++++++++++----------------- 1 file changed, 208 insertions(+), 137 deletions(-) diff --git a/.vitepress/config.mts b/.vitepress/config.mts index b21e085..9784bc3 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -1,143 +1,214 @@ -import {defineConfig} from 'vitepress' +import { defineConfig, type DefaultTheme } from 'vitepress'; + +const SITE_URL = 'https://docs.isharkfly.com/'; +const FORUM_URL = 'https://www.isharkfly.com'; +const REPO_URL = 'https://src.sharkdat.com/iSharkFly-Docs/docs-isharkfly-com'; + +// iSharkFly links shown as a dropdown at the end of the nav bar. +function isharkflyNav(zh: boolean): DefaultTheme.NavItem { + return { + text: 'iSharkFly', + items: [ + { text: zh ? 'iSharkFly' : 'iSharkFly', link: FORUM_URL }, + { text: zh ? '文档导航' : 'Docs Portal', link: SITE_URL }, + { text: zh ? '本站源码' : 'Source Code', link: REPO_URL }, + ], + }; +} + +const zhThemeText: DefaultTheme.Config = { + outline: { level: [2, 3], label: '本页目录' }, + docFooter: { prev: '上一页', next: '下一页' }, + darkModeSwitchLabel: '外观', + lightModeSwitchTitle: '切换到浅色模式', + darkModeSwitchTitle: '切换到深色模式', + sidebarMenuLabel: '菜单', + returnToTopLabel: '回到顶部', + langMenuLabel: '切换语言', + skipToContentLabel: '跳到正文', + notFound: { + title: '页面未找到', + quote: '你要找的页面不存在,或者已经被移动。', + linkLabel: '返回首页', + linkText: '返回首页', + }, + footer: { + message: '基于 MIT 许可证发布。', + copyright: `版权所有 © 2025-${new Date().getFullYear()} iSharkFly.com`, + }, +}; + +const zhSearchText = { + button: { buttonText: '搜索', buttonAriaLabel: '搜索' }, + modal: { + displayDetails: '显示详细列表', + resetButtonTitle: '清除查询', + backButtonTitle: '关闭搜索', + noResultsText: '没有找到结果', + footer: { + selectText: '选择', + selectKeyAriaLabel: '回车', + navigateText: '切换', + navigateUpKeyAriaLabel: '向上', + navigateDownKeyAriaLabel: '向下', + closeText: '关闭', + closeKeyAriaLabel: 'Esc', + }, + }, +}; // https://vitepress.dev/reference/site-config export default defineConfig({ - ignoreDeadLinks: true, - srcDir: './docs', - lang: 'zh-Hans', - title: "iSharkFly 文档和手册", - description: "iSharkFly - Docs", - head: [ - [ - 'script', - {}, - `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': -new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], -j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= -'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); -})(window,document,'script','dataLayer','GTM-W3NL9V');` - ], - [ - 'script', - { - async: '', - src: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4797644559430915', - crossorigin: 'anonymous' - } - ] + srcDir: 'docs', + lang: 'zh-CN', + title: 'iSharkFly 文档和手册', + description: 'iSharkFly - Docs', + cleanUrls: true, + lastUpdated: false, + ignoreDeadLinks: true, + head: [ + // Google Tag Manager + ['script', {}, `(function (w, d, s, l, i) { + w[l] = w[l] || []; + w[l].push({ + 'gtm.start': + new Date().getTime(), event: 'gtm.js' + }); + var f = d.getElementsByTagName(s)[0], + j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; + j.async = true; + j.src = + 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; + f.parentNode.insertBefore(j, f); + })(window, document, 'script', 'dataLayer', 'GTM-W3NL9V');`], + // End Google Tag Manager + // Google AdSense + ['script', { + async: '', + src: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4797644559430915', + crossorigin: 'anonymous', + }], + ], + markdown: { + theme: { light: 'github-light', dark: 'github-dark' }, + }, + themeConfig: { + ...zhThemeText, + // https://vitepress.dev/reference/default-theme-config + nav: [ + { text: '主页', link: '/' }, + isharkflyNav(true), ], + search: { + provider: 'local', + options: { + translations: zhSearchText, + }, + }, + sidebar: [ + { + text: '计算机相关技术', + items: [ + { + text: '程序语言', + collapsed: true, + items: [ + { + text: 'Java', link: '/programming-language/java/', collapsed: true, + items: [ + {text: '核心编程', link: '/programming-language/java/core/'}, - themeConfig: { - // https://vitepress.dev/reference/default-theme-config - nav: [ - {text: '主页', link: '/'}, - {text: 'iSharkFly', link: 'https://www.isharkfly.com'} - ], - footer: { - message: '基于 MIT 许可发布', - copyright: `版权所有 © 2025-${new Date().getFullYear()} iSharkFly.COm` + ] + }, + {text: 'Python', link: '/programming-language/python/'}, + {text: 'TypeScript', link: '/programming-language/typescript/'}, + {text: 'Mumps', link: '/programming-language/mumps/'} + ] + }, + { + text: '框架和库', + collapsed: true, + link: '/framework/', + items: [ + { + text: 'Spring', + collapsed: true, + items: [ + { + text: 'Java', link: '/programming-language/java/', collapsed: true, + items: [ + {text: '核心编程', link: '/programming-language/java/core/'}, + + ] + }, + {text: 'Python', link: '/programming-language/python/'}, + {text: 'Mumps', link: '/programming-language/mumps/'} + ] + }, + { + text: 'Node', + collapsed: true, + items: [ + {text: 'Yarn', link: '/framework/node/yarn', collapsed: true,}, + ] + }, + ] + }, + { + text: 'DevOps', + collapsed: true, + link: '/dev-ops/', + items: [ + {text: 'OS', link: '/dev-ops/os/linux'}, + { + text: '数据库', link: '/dev-ops/database/', + items: [ + {text: 'PostgreSQL', link: '/dev-ops/database/postgresql.md'}, + {text: 'MariaDB/MySQL', link: '/dev-ops/database/mariadb.md'}, + ] + }, + {text: 'Docker', link: '/dev-ops/container/docker.md'}, + + ] + }, + { text: 'AI', collapsed: true, link: '/ai/'} + ] }, - sidebar: [ - { - text: '计算机相关技术', - items: [ - { - text: '程序语言', - collapsed: true, - items: [ - { - text: 'Java', link: '/programming-language/java/', collapsed: true, - items: [ - {text: '核心编程', link: '/programming-language/java/core/'}, - - ] - }, - {text: 'Python', link: '/programming-language/python/'}, - {text: 'TypeScript', link: '/programming-language/typescript/'}, - {text: 'Mumps', link: '/programming-language/mumps/'} - ] - }, - { - text: '框架和库', - collapsed: true, - link: '/framework/', - items: [ - { - text: 'Spring', - collapsed: true, - items: [ - { - text: 'Java', link: '/programming-language/java/', collapsed: true, - items: [ - {text: '核心编程', link: '/programming-language/java/core/'}, - - ] - }, - {text: 'Python', link: '/programming-language/python/'}, - {text: 'Mumps', link: '/programming-language/mumps/'} - ] - }, - { - text: 'Node', - collapsed: true, - items: [ - {text: 'Yarn', link: '/framework/node/yarn', collapsed: true,}, - ] - }, - ] - }, - { - text: 'DevOps', - collapsed: true, - link: '/dev-ops/', - items: [ - {text: 'OS', link: '/dev-ops/os/linux'}, - { - text: '数据库', link: '/dev-ops/database/', - items: [ - {text: 'PostgreSQL', link: '/dev-ops/database/postgresql.md'}, - {text: 'MariaDB/MySQL', link: '/dev-ops/database/mariadb.md'}, - ] - }, - {text: 'Docker', link: '/dev-ops/container/docker.md'}, - - ] - }, - { text: 'AI', collapsed: true, link: '/ai/'} - ] - }, - { - text: '面试和职场', - collapsed: true, - link: '/work/', - items: [ - {text: '面试', link: '/work/interview/'}, - {text: '职场', link: '/work/workplace/'}, - {text: '认证', link: '/work/certifications/'} - ] - }, - { - text: '人文随笔', - collapsed: true, - link: '/misc/', - items: [ - {text: '人文', link: '/misc/culture/', - items: [ - {text: '湘南地区村落', link: '/misc/culture/yong-zhou'} - ] - }, - {text: '随笔', link: '/misc/essay/'} - ] - }, - { - text: '站点导航', - collapsed: true, - link: '/navigation/' - } - ], - - socialLinks: [ - {icon: 'git', link: 'https://src.sharkdat.com/iSharkFly-Docs/docs-isharkfly-com.git'} - ] - } -}) + { + text: '面试和职场', + collapsed: true, + link: '/work/', + items: [ + {text: '面试', link: '/work/interview/'}, + {text: '职场', link: '/work/workplace/'}, + {text: '认证', link: '/work/certifications/'} + ] + }, + { + text: '人文随笔', + collapsed: true, + link: '/misc/', + items: [ + {text: '人文', link: '/misc/culture/', + items: [ + {text: '湘南地区村落', link: '/misc/culture/yong-zhou'} + ] + }, + {text: '随笔', link: '/misc/essay/'} + ] + }, + { + text: '站点导航', + collapsed: true, + link: '/navigation/' + } + ], + socialLinks: [ + { icon: 'git', link: `${REPO_URL}.git` }, + ], + editLink: undefined, + } as DefaultTheme.Config, + vite: { + build: { chunkSizeWarningLimit: 4096 }, + }, +}); -- 2.54.0 From 3c1d797fc470bc4437dee2748ee64c96bf711a9b Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Wed, 2 Dec 2026 09:25:47 -0500 Subject: [PATCH 8/8] =?UTF-8?q?=E6=8F=90=E4=BE=9B=E5=9F=9F=E5=90=8D?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 39 +++++++++++++++++++++++++++++++++------ wrangler.jsonc | 3 +++ 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 11b88a8..610364d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,6 +15,10 @@ pipeline { PRJ_NAME = 'docs-isharkfly-com' // 显式指定 wrangler 配置文件 WRANGLER_CONFIG = 'wrangler.jsonc' + // 发布到线上的分支 + RELEASE_BRANCH = 'main' + // Worker Preview 的自定义预览域名 + PREVIEW_DOMAIN = 'docs.sharkdat.com' // Cloudflare API Token(Jenkins Secret text 凭据,需要 Workers Scripts:Edit 权限) CLOUDFLARE_API_TOKEN = credentials('sharkdat-cloudflare-api-token') // Cloudflare Account ID(Secret text 凭据)。设置后 wrangler 不再调用 /memberships 查询账号, @@ -75,7 +79,7 @@ pipeline { } // main 分支:部署默认 Worker - if (env.BRANCH_NAME == 'main') { + if (env.BRANCH_NAME == env.RELEASE_BRANCH) { sh """ pnpm exec wrangler deploy --config ${env.WRANGLER_CONFIG} --env="" \ --message '${deployMsg}' \ @@ -84,24 +88,47 @@ pipeline { return } - // PR 或其他分支:上传 Preview Version,不影响线上流量 + // PR 或其他分支:创建/更新 Worker Preview,不影响线上流量 + // 访问地址:https://.docs.sharkdat.com + // https://-docs-isharkfly-com.huyuchengus.workers.dev def branchArg = env.CHANGE_ID ? "pr-${env.CHANGE_ID}" : env.BRANCH_NAME - def previewAlias = branchArg + // 转成合法的 DNS 标签:小写、只含 a-z0-9-,并限制长度 + // (- 也要放进一个 63 字符的子域名标签里) + def previewName = branchArg .toLowerCase() .replaceAll(/[^a-z0-9-]+/, '-') .replaceAll(/^-+|-+$/, '') + previewName = previewName.take(40).replaceAll(/-+$/, '') // 打印当前 token 所属账号,便于排查 "Worker does not yet exist"(通常是账号不对) sh 'pnpm exec wrangler whoami' + // Preview 挂在已有 Worker 下;首次构建时先 deploy 一次创建 Worker + def workerExists = sh( + script: "pnpm exec wrangler deployments list --config ${env.WRANGLER_CONFIG} --env=\"\" > /dev/null 2>&1", + returnStatus: true + ) == 0 + if (!workerExists) { + echo "Worker ${env.PRJ_NAME} 尚不存在,先执行首次 deploy 创建 Worker ..." + sh """ + pnpm exec wrangler deploy --config ${env.WRANGLER_CONFIG} --env="" \ + --message 'Initial deploy: ${deployMsg}' + """ + } + + // 用新版 Previews(需要 wrangler >= 4.135.0),才会出现在自定义预览域名 docs.sharkdat.com 下。 + // Jenkins 检出的是 detached HEAD,无法自动识别分支,所以必须显式传 --name。 sh """ - pnpm exec wrangler versions upload --config ${env.WRANGLER_CONFIG} --env="" \ - --preview-alias '${previewAlias}' \ - --message 'Jenkins ${env.JOB_NAME} #${env.BUILD_NUMBER}' + pnpm exec wrangler preview --config ${env.WRANGLER_CONFIG} --env="" \ + --name '${previewName}' \ + --message '${deployMsg}' \ + --tag '${shortSha}' """ + + echo "Preview URL: https://${previewName}.${env.PREVIEW_DOMAIN}" } } } diff --git a/wrangler.jsonc b/wrangler.jsonc index b0dcf16..65a923b 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -12,6 +12,9 @@ }, // 允许 PR / 分支通过 versions upload 生成 Preview URL "preview_urls": true, + // `wrangler preview`(新版 Previews)要求存在 previews 块,可以为空; + // assets、兼容性设置等仍沿用顶层配置 + "previews": {}, // 原 wrangler.toml 中的可观测性配置 "observability": { -- 2.54.0