refactor: 工具使用改为独立 docs 实例,路由从 /docs/tools 迁移到 /tools

- docs/tools 移至 packages/stack-idealjs/tools
- 新增 @docusaurus/plugin-content-docs tools 实例与 sidebarsTools.ts
- 导航栏"工具使用"指向独立侧边栏 toolsSidebar
- 修复 prisma 文档中的旧路径链接

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
cqh963852andCopilot committed 2026-08-19 14:20:50 +08:00
1 parent 43581b238c
commit 80268937ee
35 files changed
+26 -3

No files matched your search

+17 -2
View File
@@ -69,6 +69,20 @@ const config: Config = {
], ],
], ],
plugins: [
[
"@docusaurus/plugin-content-docs",
{
id: "tools",
path: "tools",
routeBasePath: "tools",
sidebarPath: "./sidebarsTools.ts",
editUrl:
"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
},
],
],
themeConfig: { themeConfig: {
// Replace with your project's social card // Replace with your project's social card
image: "img/docusaurus-social-card.jpg", image: "img/docusaurus-social-card.jpg",
@@ -86,8 +100,9 @@ const config: Config = {
label: "全栈教程", label: "全栈教程",
}, },
{ {
type: "doc", type: "docSidebar",
docId: "tools/index", sidebarId: "toolsSidebar",
docsPluginId: "tools",
position: "left", position: "left",
label: "工具使用", label: "工具使用",
}, },
+8
View File
@@ -0,0 +1,8 @@
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
// 工具使用(本地工具)侧边栏,独立于全栈教程
const sidebars: SidebarsConfig = {
toolsSidebar: [{type: 'autogenerated', dirName: '.'}],
};
export default sidebars;
@@ -13,7 +13,7 @@ sidebar_position: 1
5. 确认已启动数据库 5. 确认已启动数据库
>**提示** >**提示**
如果不知道怎么启动数据库,可以参考使用 [Docker启动数据库](/docs/tools/docker/start)文档 如果不知道怎么启动数据库,可以参考使用 [Docker启动数据库](/tools/docker/start)文档
## 项目初始化 ## 项目初始化
- 打开Next.js项目 - 打开Next.js项目