show network in sidebar

This commit is contained in:
BaiMeow
2023-07-23 01:12:50 +08:00
parent 7f244e01a3
commit d4a90d1936
4 changed files with 25 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
// import { defineConfig } from 'vitepress'
import { withMermaid } from "vitepress-plugin-mermaid";
import mathjax3 from 'markdown-it-mathjax3';
import { main_sidebar, chapter2, chapter3, chapter4, chapter5, chapter6, chapter7, chapter8 } from './sidebar.js';
import { main_sidebar, chapter2, chapter3, chapter4, chapter5, chapter6, chapter7, chapter8, chapter9 } from './sidebar.js';
import { nav } from './nav.js';
import PanguPlugin from 'markdown-it-pangu'
@@ -115,6 +115,7 @@ export default withMermaid({
'/6.计算机安全/': chapter6(),
'/7.网络应用开发/': chapter7(),
'/8.基础学科/': chapter8(),
'/9.计算机网络/': chapter9(),
},
outline: [2, 6],
socialLinks: [

View File

@@ -12,6 +12,7 @@ export function nav() {
{ text: '6.计算机安全', link: '/6.计算机安全/6.计算机安全' },
{ text: '7.网络应用开发', link: '/7.网络应用开发/7.网络应用开发入门' },
{ text: '8.基础学科', link: '/8.基础学科/8.基础学科' },
{ text: '9.计算机网络', link: '9.计算机网络/9.计算机网络' },
]
},
{ text: 'Wiki史', link: '/wiki史' },

View File

@@ -68,6 +68,11 @@ export function main_sidebar() {
collapsed: true,
items: [{ text: "8.基础学科", link: "/8.基础学科/8.基础学科" }]
},
{
text: "9.计算机网络",
collapsed: true,
items: [{ text: "9.计算机网络", link: "/9.计算机网络/9.计算机网络" }]
},
{
text: 'Contributors',
link: '/contributors'
@@ -637,4 +642,18 @@ export function chapter8() {
]
}
]
}
export function chapter9() {
return [
{ text: '返回上一层', link: '/简介' },
{
text: '9.计算机网络',
collapsed: false,
items: [
{ text: '9.计算机网络', link: '/9.计算机网络/9.计算机网络' },
{ text: '9.1链路层', link: '/9.计算机网络/9.1链路层' },
]
}
]
}