Repository: NoUnityCN/NoUnityCN
Pull request #11: 添加版本发行说明按钮
Author: login: CreationWong
Created: 2025-05-20T05:00:28Z | Merged: 2025-05-23T08:15:15Z

![firefox_dUVFo4O3RS](https://github.com/user-attachments/assets/42277900-c0e7-44c5-a508-816cccfa6c66)



Diff:
diff --git "a/.github/ISSUE_TEMPLATE/bug-\345\217\215\351\246\210.md" "b/.github/ISSUE_TEMPLATE/bug-\345\217\215\351\246\210.md"
new file mode 100644
index 0000000..15cc7f4
--- /dev/null
+++ "b/.github/ISSUE_TEMPLATE/bug-\345\217\215\351\246\210.md"
@@ -0,0 +1,56 @@
+---
+name: BUG 反馈
+about: 发生了BUG
+title: BUG - [简述发生了什么]
+labels: bug
+assignees: ''
+
+---
+
+> 请先删除[]内示例内容，然后在[]内回答你的问题.
+>
+> 如果是选择框请将与之相符的情况的 - [ ]  修改为  - [X] .
+>
+> 完整的回复才能更好的帮助你.
+>
+
+------
+
+目标 URL : [如 : https://nounitycn-vercel.0d000721.com/releaseNotes?v=unityhub://6000.0.49f1/840e0a9776d9]
+
+报错页面截图 : [报错页面截图]
+
+---
+
+- [ ] 获取内容错误
+
+- [ ] 不显示内容
+
+- [ ] 不加载内容
+
+- [ ] 页面错位
+
+- [ ] 缺少内容
+
+- [ ] 开启了 VPN 或其他代理
+
+- [ ] 使用公司或校园网络
+
+---
+
+ 访问时使用的设备 :
+
+- [ ] 手机
+- [ ] 电脑
+- [ ] 平板
+- [ ] 其他设备
+
+使用的系统 : [回答操作系统]
+
+使用的浏览器 : [回答使用的浏览器名称，如:Edge .... 而不是自带浏览器等类似话语]
+
+---
+
+其他相同或类似情况的 issues : [输入 issues 编号 #xx ]
+
+其他补充 : [补充的内容]
diff --git a/app/community/page.tsx b/app/community/page.tsx
index b3b8ff8..aee85f4 100644
--- a/app/community/page.tsx
+++ b/app/community/page.tsx
@@ -30,6 +30,19 @@ export default function CommunityPage() {
               </CardContent>
             </Card>
 
+            <Card>
+              <CardHeader>
+                <CardTitle className="flex items-center gap-2">
+                  <MessageCircle className="h-6 w-6" />
+                  NoUnityCN 讨论区
+                </CardTitle>
+              </CardHeader>
+              <CardContent>
+                <p className="text-gray-600 mb-4">提出需要的功能、分享你的看法</p>
+                <Button className="w-full" href="https://github.com/NoUnityCN/NoUnityCN/discussions">访问</Button>
+              </CardContent>
+            </Card>
+
             {/* 模板 带有标签的卡片 */}
 
             {/*<Card>*/}
diff --git a/app/download/page.tsx b/app/download/page.tsx
index 32b26fc..2367cb1 100644
--- a/app/download/page.tsx
+++ b/app/download/page.tsx
@@ -1,6 +1,6 @@
 import {SiteHeader} from "@/components/site-header"
 import {SiteFooter} from "@/components/site-footer"
-import {Download, Home} from "lucide-react";
+import {Download, Home, Share} from "lucide-react";
 import {Button} from "@/components/ui/button";
 import {CardContent} from "@/components/ui/card";
 
@@ -112,6 +112,16 @@ export default function DownloadPage({searchParams,}: {
                     <div className="prose prose-blue max-w-none">
                         <CardContent>
                             <div className="space-y-4">
+                                <Button variant="secondary" className="w-full" size="lg" href={`./releaseNotes?v=${version}`}>
+                                    <div className="flex items-center justify-between w-full">
+                                        <div className="flex items-center">
+                                            <Share className="w-5 h-5 mr-2"/>
+                                            发行说明
+                                        </div>
+                                        {/*<span className="text-xs text-gray-500"></span>*/}
+                                    </div>
+                                </Button>
+                                <hr/>
                                 <Button className="w-full" size="lg" href={`${version}`}>
                                     <div className="flex items-center justify-between w-full">
                                         <div className="flex items-center">
diff --git a/app/page.tsx b/app/page.tsx
index 193f291..a7cf7e0 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -36,7 +36,10 @@ export default function Page() {
   };
 
   const handleClose = () => setIsModalOpen(false);
-  const handleDismiss = () => {
+  const handleExit = () => {
+    window.location.replace("https://www.unity.com/");
+  }
+  const handleTrue = () => {
     setCookie('dismissPrompt', 'true', 365);
     handleClose();
   };
@@ -181,9 +184,18 @@ export default function Page() {
           {type ? <><span className="font-bold">[{type}]</span> {getVersionName(url)} </> : getVersionName(url)}下载
         </Button>
         <Button
-          className="flex-initial"
-          size="lg"
-          href={`./component?v=${url}`}
+            variant="secondary"
+            className="flex-initial"
+            size="lg"
+            href={`./releaseNotes?v=${url}`}
+        >
+          <Share className="w-5 h-5 mr-2"/>
+          查看发行说明
+        </Button>
+        <Button
+            className="flex-initial"
+            size="lg"
+            href={`./component?v=${url}`}
         >
           <Box className="w-5 h-5 mr-2"/>
           添加组件
@@ -213,11 +225,11 @@ NoUnityCN**不是破解、修改、下载工具**，而只是一个方便检索U
 `}
               </ReactMarkdown>
               <div className="flex gap-4 mt-6">
-                <Button className="w-full" size="lg" onClick={handleClose}>
+                <Button className="w-full" size="lg" onClick={handleTrue}>
                    确认
                 </Button>
-                <Button variant="secondary" className="w-full" size="lg" onClick={handleDismiss}>
-                  不再显示
+                <Button variant="secondary" className="w-full" size="lg" onClick={handleExit}>
+                   访问官网
                 </Button>
               </div>
             </div>
@@ -284,6 +296,10 @@ NoUnityCN**不是破解、修改、下载工具**，而只是一个方便检索U
                     <Box className="w-5 h-5 mr-2"/>
                     添加组件
                   </Button>
+                  {/*<Button variant="secondary" className="w-full" size="lg" href={`./releaseNotes?v=${getLatestVersion(versionType)}`}>*/}
+                  {/*  <Share className="w-5 h-5 mr-2"/>*/}
+                  {/*  查看发行说明*/}
+                  {/*</Button>*/}
                 </div>
               </CardContent>
             </Card>
diff --git a/app/releaseNotes/page.tsx b/app/releaseNotes/page.tsx
new file mode 100644
index 0000000..6e085bd
--- /dev/null
+++ b/app/releaseNotes/page.tsx
@@ -0,0 +1,131 @@
+"use server";
+
+import { SiteHeader } from "@/components/site-header"
+import { SiteFooter } from "@/components/site-footer"
+import fetch from 'node-fetch';
+import { micromark } from 'micromark';
+
+// 获取 Unity 版本发布信息
+async function fetchReleaseNotes(version: string) {
+    const url = `https://services.api.unity.com/unity/editor/release/v1/releases?version=${encodeURIComponent(version)}`;
+    const res = await fetch(url);
+    if (!res.ok) throw new Error(`API 请求失败: ${res.status}`);
+    return await res.json();
+}
+
+
+// 获取 Markdown 文件内容
+async function fetchMarkdownContent(url: string): Promise<string | null> {
+    try {
+        const res = await fetch(url, {
+            headers: {
+                'User-Agent': 'Next.js Server Component'
+            }
+        });
+        if (!res.ok) return null;
+        return await res.text();
+    } catch (e) {
+        console.error('获取 Markdown 出错:', e);
+        return null;
+    }
+}
+
+function parseUnityHubUri(uri: string) {
+    const pattern = /^unityhub:\/\/([^\/]+)\/(.+)$/;
+    const matches = uri.match(pattern);
+    if (!matches || matches.length < 3) return null;
+    return { version: matches[1] };
+}
+
+export default async function releaseNotesPage({ searchParams }: { searchParams: { v?: string | string[] } }) {
+    const versionParam = Array.isArray(searchParams.v) ? searchParams.v[0] : searchParams.v;
+    const parsed = versionParam ? parseUnityHubUri(versionParam) : null;
+
+    let htmlContent = null;
+    let fallbackUrl = null;
+
+    if (parsed && parsed.version) {
+        try {
+            const data = await fetchReleaseNotes(parsed.version);
+            if (data.results?.length > 0) {
+                const releaseNote = data.results[0].releaseNotes;
+                if (releaseNote.type === 'MD') {
+                    const mdText = await fetchMarkdownContent(releaseNote.url);
+                    if (mdText) {
+                        htmlContent = micromark(mdText);
+                        fallbackUrl = releaseNote.url;
+                    } else {
+                        fallbackUrl = releaseNote.url;
+                    }
+                }
+            }
+        } catch (e) {
+            console.error('处理出错:', e);
+        }
+
+        if (htmlContent) {
+            return (
+                <div className="min-h-screen flex flex-col">
+                    <SiteHeader />
+                    <div className="flex flex-col items-center justify-center min-h-screen py-4 px-4 text-center">
+                        {versionParam ? (<h1 className="text-4xl font-bold mb-4">Release Notes - {parsed.version}</h1>) : (<h1 className="text-4xl font-bold mb-4">Release Notes</h1>)}
+                        <hr/>
+                        <div align="left" dangerouslySetInnerHTML={{ __html: htmlContent }} />
+                        <br/>
+                        <hr/>
+                        <p className="text-sm text-gray-500 mt-8">
+                            <a href={fallbackUrl} target="_blank" rel="noopener noreferrer">{fallbackUrl}</a>
+                        </p>
+                    </div>
+                    <SiteFooter />
+                </div>
+            );
+        } else if (fallbackUrl) {
+            return (
+                <div className="flex flex-col items-center justify-center min-h-screen py-4 px-4 text-center">
+                    <h1 className="text-4xl font-bold mb-4">无法加载发布说明</h1>
+                    <p className="mb-4">服务器未能加载内容</p>
+                    <a
+                        href="https://github.com/NoUnityCN/NoUnityCN/issues/new"
+                        rel="noopener noreferrer"
+                        target="_blank"
+                        className="text-blue-600 underline"
+                    >
+                        通过 Github 向开发者反馈
+                    </a>
+
+                    {/*<a*/}
+                    {/*    href={fallbackUrl}*/}
+                    {/*    target="_blank"*/}
+                    {/*    rel="noopener noreferrer"*/}
+                    {/*    className="text-blue-600 underline"*/}
+                    {/*>*/}
+                    {/*    单击尝试下载原始文件*/}
+                    {/*</a>*/}
+                </div>
+            );
+        } else {
+            return (
+                <div className="min-h-screen flex flex-col">
+                    <SiteHeader />
+                    <div className="flex flex-col items-center justify-center min-h-screen py-4 px-4 text-center">
+                        <h1 className="text-4xl font-bold mb-4">无效的请求</h1>
+                        <p>未找到对应版本的发布说明</p>
+                    </div>
+                    <SiteFooter />
+                </div>
+            );
+        }
+    }
+
+    return (
+        <div className="min-h-screen flex flex-col">
+            <SiteHeader />
+            <div className="flex flex-col items-center justify-center min-h-screen py-4 px-4 text-center">
+                <h1 className="text-4xl font-bold mb-4">400 Bad Request</h1>
+                <p>你来到了一片没有知识的荒原</p>
+            </div>
+            <SiteFooter />
+        </div>
+    );
+}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index c00cc85..f743784 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -47,8 +47,10 @@
         "embla-carousel-react": "8.5.1",
         "input-otp": "1.4.1",
         "lucide-react": "^0.454.0",
+        "marked": "^15.0.12",
         "next": "^15.2.4",
         "next-themes": "^0.4.4",
+        "node-fetch": "^3.3.2",
         "react": "^18",
         "react-day-picker": "^9.5.1",
         "react-dom": "^18",
@@ -2653,6 +2655,15 @@
         "node": ">=12"
       }
     },
+    "node_modules/data-uri-to-buffer": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
+      "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 12"
+      }
+    },
     "node_modules/date-fns": {
       "version": "4.1.0",
       "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz",
@@ -2866,6 +2877,29 @@
         "reusify": "^1.0.4"
       }
     },
+    "node_modules/fetch-blob": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
+      "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/jimmywarting"
+        },
+        {
+          "type": "paypal",
+          "url": "https://paypal.me/jimmywarting"
+        }
+      ],
+      "license": "MIT",
+      "dependencies": {
+        "node-domexception": "^1.0.0",
+        "web-streams-polyfill": "^3.0.3"
+      },
+      "engines": {
+        "node": "^12.20 || >= 14.13"
+      }
+    },
     "node_modules/fill-range": {
       "version": "7.1.1",
       "license": "MIT",
@@ -2890,6 +2924,18 @@
         "url": "https://github.com/sponsors/isaacs"
       }
     },
+    "node_modules/formdata-polyfill": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
+      "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
+      "license": "MIT",
+      "dependencies": {
+        "fetch-blob": "^3.1.2"
+      },
+      "engines": {
+        "node": ">=12.20.0"
+      }
+    },
     "node_modules/fraction.js": {
       "version": "4.3.7",
       "license": "MIT",
@@ -3226,6 +3272,18 @@
         "url": "https://github.com/sponsors/wooorm"
       }
     },
+    "node_modules/marked": {
+      "version": "15.0.12",
+      "resolved": "https://registry.npmjs.org/marked/-/marked-15.0.12.tgz",
+      "integrity": "sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA==",
+      "license": "MIT",
+      "bin": {
+        "marked": "bin/marked.js"
+      },
+      "engines": {
+        "node": ">= 18"
+      }
+    },
     "node_modules/mdast-util-find-and-replace": {
       "version": "3.0.2",
       "resolved": "https://registry.npmmirror.com/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.2.tgz",
@@ -4216,6 +4274,44 @@
         "node": "^10 || ^12 || >=14"
       }
     },
+    "node_modules/node-domexception": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
+      "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
+      "deprecated": "Use your platform's native DOMException instead",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/jimmywarting"
+        },
+        {
+          "type": "github",
+          "url": "https://paypal.me/jimmywarting"
+        }
+      ],
+      "license": "MIT",
+      "engines": {
+        "node": ">=10.5.0"
+      }
+    },
+    "node_modules/node-fetch": {
+      "version": "3.3.2",
+      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
+      "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
+      "license": "MIT",
+      "dependencies": {
+        "data-uri-to-buffer": "^4.0.0",
+        "fetch-blob": "^3.1.4",
+        "formdata-polyfill": "^4.0.10"
+      },
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/node-fetch"
+      }
+    },
     "node_modules/node-releases": {
       "version": "2.0.19",
       "license": "MIT"
@@ -5499,6 +5595,15 @@
         "d3-timer": "^3.0.1"
       }
     },
+    "node_modules/web-streams-polyfill": {
+      "version": "3.3.3",
+      "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
+      "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 8"
+      }
+    },
     "node_modules/which": {
       "version": "2.0.2",
       "license": "ISC",
diff --git a/package.json b/package.json
index f4d37a8..bb9a9f6 100644
--- a/package.json
+++ b/package.json
@@ -48,8 +48,10 @@
     "embla-carousel-react": "8.5.1",
     "input-otp": "1.4.1",
     "lucide-react": "^0.454.0",
+    "marked": "^15.0.12",
     "next": "^15.2.4",
     "next-themes": "^0.4.4",
+    "node-fetch": "^3.3.2",
     "react": "^18",
     "react-day-picker": "^9.5.1",
     "react-dom": "^18",
diff --git a/public/docs/_sidebar.md b/public/docs/_sidebar.md
index 1c98635..1b95886 100644
--- a/public/docs/_sidebar.md
+++ b/public/docs/_sidebar.md
@@ -1,8 +1,8 @@
 * [](/ "NoUnityCN")
 
-* [NoUnityCN-2025年4月报告](./index.md)
+* [NoUnityCN-2025年4月报告](./index)
 
-* [关于 NoUnityCN](./about.md)
+* [关于 NoUnityCN](./about)
 
 ---
 


Reviews:
user: login: CreationWong
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-23T05:51:48Z
user: login: CreationWong
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-23T06:01:49Z
user: login: CreationWong
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-23T07:55:05Z
user: login: CreationWong
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-23T07:56:58Z
user: login: CreationWong
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-23T07:58:25Z
user: login: CreationWong
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-23T08:06:35Z
user: login: CreationWong
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-23T08:07:52Z
user: login: CreationWong
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-23T08:10:54Z

Review comments:
diff_hunk: @@ -284,6 +293,10 @@ NoUnityCN**不是破解、修改、下载工具**，而只是一个方便检索U
                     <Box className="w-5 h-5 mr-2"/>
                     添加组件
                   </Button>
+                  {/*<Button variant="secondary" className="w-full" size="lg" href={`./releaseNotes?v=${getLatestVersion(versionType)}`}>*/}
path: app/page.tsx
user: login: CreationWong
body: 注释掉此处，防止排版错位
created_at: 2025-05-20T05:10:31Z
author_association: COLLABORATOR
diff_hunk: @@ -284,6 +293,10 @@ NoUnityCN**不是破解、修改、下载工具**，而只是一个方便检索U
                     <Box className="w-5 h-5 mr-2"/>
                     添加组件
                   </Button>
+                  {/*<Button variant="secondary" className="w-full" size="lg" href={`./releaseNotes?v=${getLatestVersion(versionType)}`}>*/}
path: app/page.tsx
user: login: CreationWong
body: 这个暂时保留注释，以后更改其他方式
created_at: 2025-05-23T06:01:49Z
author_association: COLLABORATOR
diff_hunk: @@ -36,7 +36,10 @@ export default function Page() {
   };
 
   const handleClose = () => setIsModalOpen(false);
-  const handleDismiss = () => {
+  const handleExit = () => {
+    window.location.replace("https://www.unity.com/");
path: app/page.tsx
user: login: CreationWong
body: hook 问题，使用 js 代替
created_at: 2025-05-23T07:55:04Z
author_association: COLLABORATOR
path: .github/ISSUE_TEMPLATE/bug-反馈.md
user: login: CreationWong
body: 这个文件是可选的
created_at: 2025-05-23T07:56:57Z
author_association: COLLABORATOR
path: app/releaseNotes/page.tsx
user: login: CreationWong
body: 重构了一下
created_at: 2025-05-23T07:58:25Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,131 @@
+"use server";
+
+import { SiteHeader } from "@/components/site-header"
+import { SiteFooter } from "@/components/site-footer"
+import fetch from 'node-fetch';
+import { micromark } from 'micromark';
+
+// 获取 Unity 版本发布信息
+async function fetchReleaseNotes(version: string) {
+    const url = `https://services.api.unity.com/unity/editor/release/v1/releases?version=${encodeURIComponent(version)}`;
+    const res = await fetch(url);
+    if (!res.ok) throw new Error(`API 请求失败: ${res.status}`);
+    return await res.json();
+}
+
+
+// 获取 Markdown 文件内容
+async function fetchMarkdownContent(url: string): Promise<string | null> {
+    try {
+        const res = await fetch(url, {
+            headers: {
+                'User-Agent': 'Next.js Server Component'
+            }
+        });
+        if (!res.ok) return null;
+        return await res.text();
+    } catch (e) {
+        console.error('获取 Markdown 出错:', e);
+        return null;
+    }
+}
+
+function parseUnityHubUri(uri: string) {
+    const pattern = /^unityhub:\/\/([^\/]+)\/(.+)$/;
+    const matches = uri.match(pattern);
+    if (!matches || matches.length < 3) return null;
+    return { version: matches[1] };
+}
+
+export default async function Page({ searchParams }: { searchParams: { v?: string | string[] } }) {
path: app/releaseNotes/page.tsx
user: login: CreationWong
body: 这个函数名需要修改吗
created_at: 2025-05-23T08:06:35Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,131 @@
+"use server";
+
+import { SiteHeader } from "@/components/site-header"
+import { SiteFooter } from "@/components/site-footer"
+import fetch from 'node-fetch';
+import { micromark } from 'micromark';
+
+// 获取 Unity 版本发布信息
+async function fetchReleaseNotes(version: string) {
+    const url = `https://services.api.unity.com/unity/editor/release/v1/releases?version=${encodeURIComponent(version)}`;
+    const res = await fetch(url);
+    if (!res.ok) throw new Error(`API 请求失败: ${res.status}`);
+    return await res.json();
+}
+
+
+// 获取 Markdown 文件内容
+async function fetchMarkdownContent(url: string): Promise<string | null> {
+    try {
+        const res = await fetch(url, {
+            headers: {
+                'User-Agent': 'Next.js Server Component'
+            }
+        });
+        if (!res.ok) return null;
+        return await res.text();
+    } catch (e) {
+        console.error('获取 Markdown 出错:', e);
+        return null;
+    }
+}
+
+function parseUnityHubUri(uri: string) {
+    const pattern = /^unityhub:\/\/([^\/]+)\/(.+)$/;
+    const matches = uri.match(pattern);
+    if (!matches || matches.length < 3) return null;
+    return { version: matches[1] };
+}
+
+export default async function Page({ searchParams }: { searchParams: { v?: string | string[] } }) {
path: app/releaseNotes/page.tsx
user: login: CreationWong
body: 这个函数马上快成屎山了.....
created_at: 2025-05-23T08:07:52Z
author_association: COLLABORATOR
diff_hunk: @@ -37,7 +37,7 @@ function parseUnityHubUri(uri: string) {
     return { version: matches[1] };
 }
 
-export default async function Page({ searchParams }: { searchParams: { v?: string | string[] } }) {
+export default async function releaseNotesPage({ searchParams }: { searchParams: { v?: string | string[] } }) {
path: app/releaseNotes/page.tsx
user: login: CreationWong
body: 修改为 releaseNotesPage
created_at: 2025-05-23T08:10:54Z
author_association: COLLABORATOR

PR comments:
user: login: CreationWong
created_at: 2025-05-20T05:04:14Z
body: 但是目前还不能直接访问，只能通过代理访问。
author_association: COLLABORATOR
user: login: DanKE123abc
created_at: 2025-05-21T05:12:32Z
body: 客户端程序的话就必须开代理了，看一下能不能在服务端创建一个路由
author_association: COLLABORATOR
user: login: CreationWong
created_at: 2025-05-21T10:25:18Z
body: > 客户端程序的话就必须开代理了，看一下能不能在服务端创建一个路由

@DanKE123abc 

目前发现一个官方api网站，https://services.docs.unity.com/

里面有个api，https://services.api.unity.com/unity/editor/release/v1/releases?version=6000.0.48f1

![image](https://github.com/user-attachments/assets/88b166e9-12e2-4c84-8323-16c25eeb6ab7)

![image](https://github.com/user-attachments/assets/e547c8f5-33cc-427d-b343-38ac94e27ec2)

在releaseNotes下url值是
https://storage.googleapis.com/live-platform-resources-prd/templates/assets/6000_0_48f1_d6826692ce/6000_0_48f1_d6826692ce.md

一个md文档。
因为有请求限制，加上不知道ID是怎来的。

> Rate Limits
> These APIs have rate limiting in place. Requests are limited to 10 request per second and 1000 requests per thirty minutes per endpoint. The APIs respond with a HTTP status code if the rate limit is exceeded.429

https://storage.googleapis.com/live-platform-resources-prd/templates/assets/6000_0_48f1_d6826692ce/6000_0_48f1_d6826692ce.md 
是由
https://storage.googleapis.com/live-platform-resources-prd/templates/assets/[完整版本号]_[未知ID]/[完整版本号]_[未知ID].md

author_association: COLLABORATOR
user: login: DanKE123abc
created_at: 2025-05-22T09:49:16Z
body: 那这个[api](https://services.docs.unity.com/)可以创建一个路由，获取到md后渲染
author_association: COLLABORATOR
user: login: CreationWong
created_at: 2025-05-22T10:19:50Z
body: > 那这个[api](https://services.docs.unity.com/)可以创建一个路由，获取到md后渲染

有相关文档吗，next.js的路由不太熟悉，只会重定向。
author_association: COLLABORATOR
user: login: CreationWong
created_at: 2025-05-22T13:36:50Z
body: ![image](https://github.com/user-attachments/assets/117ef689-5500-4b77-a85a-4f56a1091634)
成功实现服务器获取
author_association: COLLABORATOR
user: login: DanKE123abc
created_at: 2025-05-23T04:59:46Z
body: 可以，底栏和顶栏保留，把之前审查的改一下
author_association: COLLABORATOR
user: login: CreationWong
created_at: 2025-05-23T07:18:34Z
body: @DanKE123abc 
添加了一个[ issue 模板](https://github.com/NoUnityCN/NoUnityCN/pull/11/commits/defac5e7df0bf5aca43e8969a9f018dfc515fc37)

[97a1e3d](https://github.com/NoUnityCN/NoUnityCN/pull/11/commits/97a1e3d39a9afb03d2d3541655078303e0283008)添加底栏和顶栏

[c44ffb5](https://github.com/NoUnityCN/NoUnityCN/pull/11/commits/c44ffb52ab0c7e14904335437603e544f3b93e21)修改了以前的问题
author_association: COLLABORATOR
user: login: CreationWong
created_at: 2025-05-23T07:24:52Z
body: > @DanKE123abc 这个是我部署的测试环境 https://nounitycn-vercel.0d000721.com/ （目前只开放了浏览发行说明，访问其他会跳转到 [www.nounitycn.top](http://www.nounitycn.top) ） 演示 #13

https://nounitycn-vercel.0d000721.com/
作为备用服务器运行
author_association: COLLABORATOR
user: login: CreationWong
created_at: 2025-05-23T07:54:11Z
body: [125bf66](https://github.com/NoUnityCN/NoUnityCN/pull/11/commits/125bf6621bc55c7aded25817a95ea0b1dbe10f5b)
我修改了弹窗逻辑，以前的逻辑太古怪了
我修改的↓
单击 确认 按钮 -> 创建 cookie
不再显示修改为访问官网 -> 跳转到官网
author_association: COLLABORATOR
user: login: DanKE123abc
created_at: 2025-05-23T07:58:02Z
body: 因为这个弹窗是claude写的……
author_association: COLLABORATOR
user: login: CreationWong
created_at: 2025-05-23T07:59:45Z
body: > 因为这个弹窗是claude写的......

怪不得.....
现在可以合并吗
author_association: COLLABORATOR
user: login: DanKE123abc
created_at: 2025-05-23T08:04:11Z
body: 改一下release note page 的函数名
author_association: COLLABORATOR
user: login: CreationWong
created_at: 2025-05-23T08:05:19Z
body: > 怕个

是 page 吗，那个函数? 
author_association: COLLABORATOR
user: login: DanKE123abc
created_at: 2025-05-23T08:08:10Z
body: > > 怕个
> 
> 是 page 吗，那个函数? 

对

author_association: COLLABORATOR
user: login: CreationWong
created_at: 2025-05-23T08:08:56Z
body: > > > 怕个
> > 
> > 
> > 是 page 吗，那个函数?
> 
> 对

我测试完提交
author_association: COLLABORATOR
user: login: CreationWong
created_at: 2025-05-23T08:17:46Z
body: @DanKE123abc 
#4 可以关闭了
author_association: COLLABORATOR