Skip to content

Commit

Permalink
Merge pull request #85 from GuoXiCheng/dev-c
Browse files Browse the repository at this point in the history
update sidebar
  • Loading branch information
GuoXiCheng authored Jun 20, 2024
2 parents 33a85ed + 11a76e7 commit 8806ed5
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
23 changes: 17 additions & 6 deletions src/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default defineConfig(
text: "JavaScript",
items: [
{
text: "介绍",
text: "JavaScript 介绍",
link: "/javascript/introduction/what-is-javascript",
},
{
Expand All @@ -46,16 +46,27 @@ export default defineConfig(
items: [
{
text: "Vue",
link: "frontend/vue/introduction/what-is-vue",
link: "/frontend/vue/introduction/what-is-vue",
},
{
text: "React",
link: "frontend/react/introduction/what-is-react",
link: "/frontend/react/introduction/what-is-react",
},
],
},
{
text: "后端",
items: [{ text: "NodeJS", link: "/backend/nodejs/about-nodejs" }],
},
{
text: "云原生",
items: [
{
text: "docker",
link: "/cloud-native/docker/docker-architecture",
},
],
},
{ text: "后端", link: "/backend/nodejs/index" },
{ text: "云原生", link: "/cloud-native/index" },
{
text: "方法论",
items: [
Expand All @@ -65,7 +76,7 @@ export default defineConfig(
},
],
},
{ text: "AI", link: "/ai/index" },
// { text: "AI", link: "/ai/index" },
{ text: "参考", link: "/reference" },
],

Expand Down
5 changes: 3 additions & 2 deletions src/.vitepress/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ export default function getSidebar() {
.readdirSync("src/.vitepress/sidebars")
.reduce(
(acc, file) =>
(acc +=
fs.readFileSync(`src/.vitepress/sidebars/${file}`, "utf8") + "\n"),
(acc += file.endsWith("yaml")
? fs.readFileSync(`src/.vitepress/sidebars/${file}`, "utf8") + "\n"
: ""),
""
);
return yaml.load(sidebar);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/cloud-native:
/cloud-native/docker:
- text: docker
items:
- text: docker 的架构
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/backend:
/backend/nodejs:
- text: NodeJS
link: /backend/nodejs/index
items:
- text: 关于 NodeJS
link: /backend/nodejs/about-nodejs
Expand Down

0 comments on commit 8806ed5

Please sign in to comment.