Skip to content

Commit

Permalink
update sidebars
Browse files Browse the repository at this point in the history
  • Loading branch information
Xicheng Guo committed Jun 12, 2024
1 parent b8280f1 commit 2fc6958
Show file tree
Hide file tree
Showing 8 changed files with 250 additions and 243 deletions.
16 changes: 12 additions & 4 deletions src/.vitepress/sidebar.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import yaml from 'js-yaml';
import fs from 'fs';
import yaml from "js-yaml";
import fs from "fs";

export default function getSidebar() {
return yaml.load(fs.readFileSync('src/.vitepress/sidebar.yaml', 'utf8'));
}
const sidebar = fs
.readdirSync("src/.vitepress/sidebars")
.reduce(
(acc, file) =>
(acc +=
fs.readFileSync(`src/.vitepress/sidebars/${file}`, "utf8") + "\n"),
""
);
return yaml.load(sidebar);
}
239 changes: 0 additions & 239 deletions src/.vitepress/sidebar.yaml

This file was deleted.

21 changes: 21 additions & 0 deletions src/.vitepress/sidebars/ai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/ai:
- text: AI 发展历程
link: /ai/history-of-ai
- text: AI 领域
link: /ai/ai-field
- text: LangChain
items:
- text: LangChain 介绍
link: /ai/lang-chain/introduction
- text: 用例
items:
- text: 标记文本
link: /ai/lang-chain/use-case/tagging
- text: 文档内容总结
link: /ai/lang-chain/use-case/summarization
- text: LangServe
items:
- text: LangServe 介绍
link: /ai/lang-chain/lang-serve/introduction
- text: 构建 LangServe 应用
link: /ai/lang-chain/lang-serve/build-application
10 changes: 10 additions & 0 deletions src/.vitepress/sidebars/backend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/backend:
- text: NodeJS
link: /backend/nodejs/index
items:
- text: 关于 NodeJS
link: /backend/nodejs/about-nodejs
- text: EventEmitter
link: /backend/nodejs/event-emitter
- text: File System
link: /backend/nodejs/file-system
13 changes: 13 additions & 0 deletions src/.vitepress/sidebars/cloud-native.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/cloud-native:
- text: docker
items:
- text: docker 的架构
link: /cloud-native/docker/docker-architecture
- text: docker 的镜像结构
link: /cloud-native/docker/docker-image-structure
- text: 安装 docker
link: /cloud-native/docker/install-docker
- text: docker 基本使用命令
link: /cloud-native/docker/basic-commands
- text: 构建 docker 镜像
link: /cloud-native/docker/build-docker-image
Loading

0 comments on commit 2fc6958

Please sign in to comment.