Skip to content

Commit

Permalink
Merge pull request #79 from GuoXiCheng/dev-c
Browse files Browse the repository at this point in the history
Dev c
  • Loading branch information
GuoXiCheng authored Jun 12, 2024
2 parents 9dbd174 + 2fc6958 commit 1587489
Show file tree
Hide file tree
Showing 14 changed files with 290 additions and 245 deletions.
20 changes: 17 additions & 3 deletions src/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,23 @@ export default defineConfig(
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: "Home", link: "/" },
{ text: "JavaScript", link: "/javascript/index" },
{ text: "Vue", link: "/vue/index" },
{ text: "前端", link: "/frontend/index" },
{
text: "JavaScript",
link: "/javascript/introduction/what-is-javascript",
},
{
text: "前端",
items: [
{
text: "Vue",
link: "frontend/vue/introduction/what-is-vue",
},
{
text: "React",
link: "frontend/react/introduction/what-is-react",
},
],
},
{ text: "后端", link: "/backend/nodejs/index" },
{ text: "云原生", link: "/cloud-native/index" },
{ text: "AI", link: "/ai/index" },
Expand Down
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);
}
231 changes: 0 additions & 231 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 1587489

Please sign in to comment.