mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-15 07:31:19 +00:00
fix: var selector (#5593)
* fix: var selector * doc * doc time * doc time * doc time * doc time * doc time * doc time * doc time
This commit is contained in:
@@ -37,6 +37,7 @@ WORKDIR /app
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/data ./data
|
||||
USER nextjs
|
||||
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
@@ -4,25 +4,9 @@ import { notFound } from 'next/navigation';
|
||||
import NotFound from '@/components/docs/not-found';
|
||||
import { createRelativeLink } from 'fumadocs-ui/mdx';
|
||||
import { getMDXComponents } from '@/mdx-components';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
// 读取文档修改时间数据
|
||||
function getDocLastModifiedData(): Record<string, string> {
|
||||
try {
|
||||
const dataPath = path.join(process.cwd(), 'data', 'doc-last-modified.json');
|
||||
|
||||
if (!fs.existsSync(dataPath)) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const data = fs.readFileSync(dataPath, 'utf8');
|
||||
return JSON.parse(data);
|
||||
} catch (error) {
|
||||
console.error('读取文档修改时间数据失败:', error);
|
||||
return {};
|
||||
}
|
||||
}
|
||||
// 在构建时导入静态数据
|
||||
import docLastModifiedData from '@/data/doc-last-modified.json';
|
||||
|
||||
export default async function Page({
|
||||
params
|
||||
@@ -32,16 +16,15 @@ export default async function Page({
|
||||
const { lang, slug } = await params;
|
||||
const page = source.getPage(slug, lang);
|
||||
|
||||
// 如果页面不存在,调用 notFound()
|
||||
if (!page || !page.data || !page.file) {
|
||||
return <NotFound />;
|
||||
}
|
||||
|
||||
const MDXContent = page.data.body;
|
||||
|
||||
// 获取文档的最后修改时间
|
||||
const docLastModifiedData = getDocLastModifiedData();
|
||||
const filePath = `content/docs/${page.file.path}`;
|
||||
// 使用构建时导入的静态数据
|
||||
const filePath = `document/content/docs/${page.file.path}`;
|
||||
// @ts-ignore
|
||||
const lastModified = docLastModifiedData[filePath] || page.data.lastModified;
|
||||
|
||||
return (
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 'V4.12.0(包含升级脚本)'
|
||||
description: 'FastGPT V4.12.0 更新说明'
|
||||
description: 'FastGPT V4.12.0 更新说明, 发布于 2025-8-11。'
|
||||
---
|
||||
|
||||
## 更新指南
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 'V4.12.1(包含升级脚本)'
|
||||
description: 'FastGPT V4.12.1 更新说明'
|
||||
description: 'FastGPT V4.12.1 更新说明, 发布于 2025-8-18。'
|
||||
---
|
||||
|
||||
## 更新指南
|
||||
|
@@ -1,14 +1,14 @@
|
||||
---
|
||||
title: 'V4.12.2'
|
||||
description: 'FastGPT V4.12.2 更新说明'
|
||||
description: 'FastGPT V4.12.2 更新说明, 发布于 2025-8-26。'
|
||||
---
|
||||
|
||||
## 更新指南
|
||||
|
||||
### 1. 更新镜像:
|
||||
|
||||
- 更新 FastGPT 镜像tag: v4.12.2-fix
|
||||
- 更新 FastGPT 商业版镜像tag: v4.12.2-fix
|
||||
- 更新 FastGPT 镜像tag: v4.12.2-fix3
|
||||
- 更新 FastGPT 商业版镜像tag: v4.12.2-fix3
|
||||
- 更新 fastgpt-plugin 镜像 tag: v0.1.11
|
||||
- mcp_server 无需更新
|
||||
- Sandbox 无需更新
|
||||
|
@@ -16,5 +16,6 @@ description: 'FastGPT V4.12.3 更新说明'
|
||||
1. 单团队模式下,如果用户离开,则无法重新进入团队。
|
||||
2. 工作流文件上传默认打开,但输入侧未添加文件输出。
|
||||
3. 连续用户选择,分支无法正常运行。
|
||||
4. 工作流,变量更新,数组选择器异常。
|
||||
|
||||
## 🔨 工具更新
|
||||
|
@@ -104,8 +104,8 @@
|
||||
"document/content/docs/upgrading/4-11/4111.mdx": "2025-08-07T22:49:09+08:00",
|
||||
"document/content/docs/upgrading/4-12/4120.mdx": "2025-08-12T22:45:19+08:00",
|
||||
"document/content/docs/upgrading/4-12/4121.mdx": "2025-08-15T22:53:06+08:00",
|
||||
"document/content/docs/upgrading/4-12/4122.mdx": "2025-08-27T00:31:33+08:00",
|
||||
"document/content/docs/upgrading/4-12/4123.mdx": "2025-09-04T13:48:03+08:00",
|
||||
"document/content/docs/upgrading/4-12/4122.mdx": "2025-09-04T21:37:57+08:00",
|
||||
"document/content/docs/upgrading/4-12/4123.mdx": "2025-09-04T21:37:57+08:00",
|
||||
"document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00",
|
||||
"document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00",
|
||||
"document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00",
|
||||
|
Reference in New Issue
Block a user