Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
51268f11
authored
Jul 24, 2025
by
dreamer6680
Committed by
GitHub
Jul 24, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:add not-found path map (#5309)
parent
c390eb18
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
5 deletions
+44
-5
document/components/docs/not-found.tsx
+41
-2
document/content/docs/introduction/development/upgrading/4816.mdx
+1
-1
document/content/docs/introduction/development/upgrading/index.mdx
+2
-2
No files found.
document/components/docs/not-found.tsx
View file @
51268f11
'use client'
;
import
{
redirect
}
from
'next/navigation'
;
import
{
redirect
}
from
'next/navigation'
;
import
{
usePathname
}
from
'next/navigation'
;
import
{
useEffect
}
from
'react'
;
const
exactMap
:
Record
<
string
,
string
>
=
{
'/docs/intro'
:
'/docs/introduction/index'
,
'/docs/guide/dashboard/workflow/coreferenceresolution'
:
'/docs/introduction/guide/dashboard/workflow/coreferenceResolution'
,
'/docs/guide/admin/sso_dingtalk'
:
'/docs/introduction/guide/admin/sso#/docs/introduction/guide/admin/sso#钉钉'
,
'/docs/guide/knowledge_base/rag'
:
'/docs/introduction/guide/knowledge_base/RAG'
,
'/docs/commercial/intro/'
:
'/docs/introduction'
};
const
prefixMap
:
Record
<
string
,
string
>
=
{
'/docs/development'
:
'/docs/introduction/development'
,
'/docs/FAQ'
:
'/docs/introduction/FAQ'
,
'/docs/guide'
:
'/docs/introduction/guide'
,
'/docs/shopping_cart'
:
'/docs/introduction/shopping_cart'
,
'/docs/agreement'
:
'/docs/protocol'
};
export
default
function
NotFound
()
{
export
default
function
NotFound
()
{
redirect
(
`/docs/introduction`
);
const
pathname
=
usePathname
();
return
<></>;
useEffect
(()
=>
{
if
(
exactMap
[
pathname
])
{
redirect
(
exactMap
[
pathname
]);
return
;
}
for
(
const
[
oldPrefix
,
newPrefix
]
of
Object
.
entries
(
prefixMap
))
{
if
(
pathname
.
startsWith
(
oldPrefix
))
{
const
rest
=
pathname
.
slice
(
oldPrefix
.
length
);
redirect
(
newPrefix
+
rest
);
return
;
}
}
redirect
(
'/docs/introduction'
);
},
[
pathname
]);
return
;
}
}
document/content/docs/introduction/development/upgrading/4816.mdx
View file @
51268f11
...
@@ -50,7 +50,7 @@ description: FastGPT V4.8.16 更新说明
...
@@ -50,7 +50,7 @@ description: FastGPT V4.8.16 更新说明
2. 新增 - 商业版支持 API 知识库和链接集合定时同步。
2. 新增 - 商业版支持 API 知识库和链接集合定时同步。
3. 新增 - 猜你想问支持选择模型和自定义提示词。
3. 新增 - 猜你想问支持选择模型和自定义提示词。
4. 新增 - 钉钉和企微机器人 webhook 插件。
4. 新增 - 钉钉和企微机器人 webhook 插件。
5. 新增 - 商业版支持钉钉 SSO 登录配置。[点击查看教程](/docs/introduction/guide/admin/sso
_dingtalk/
)
5. 新增 - 商业版支持钉钉 SSO 登录配置。[点击查看教程](/docs/introduction/guide/admin/sso
#钉钉
)
6. 新增 - 商业版支持飞书和语雀知识库导入。[点击查看教程](/docs/introduction/guide/knowledge_base/lark_dataset/)
6. 新增 - 商业版支持飞书和语雀知识库导入。[点击查看教程](/docs/introduction/guide/knowledge_base/lark_dataset/)
7. 新增 - sandbox 新增 createHmac 加密全局方法。
7. 新增 - sandbox 新增 createHmac 加密全局方法。
8. 新增 - 工作流右键支持全部折叠。
8. 新增 - 工作流右键支持全部折叠。
...
...
document/content/docs/introduction/development/upgrading/index.mdx
View file @
51268f11
...
@@ -5,4 +5,4 @@ description: FastGPT 版本更新
...
@@ -5,4 +5,4 @@ description: FastGPT 版本更新
import { Redirect } from '@/components/docs/Redirect';
import { Redirect } from '@/components/docs/Redirect';
<Redirect to="/docs/introduction/development/upgrading/4111" />
<Redirect to="/docs/introduction/development/upgrading/intro" />
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment