Skip to content

Commit

Permalink
add navbar config
Browse files Browse the repository at this point in the history
add navbar config
  • Loading branch information
wumindc committed Jan 17, 2024
1 parent d776f81 commit 957cd0e
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 65 deletions.
4 changes: 2 additions & 2 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export default defineUserConfig({
locales: {
'/': {
lang: 'zh-CN',
title: '冒险者',
description: '没有什么不可以',
title: 'coder',
description: 'coding everything',
}
},
theme: defaultTheme({
Expand Down
30 changes: 29 additions & 1 deletion docs/.vuepress/configs/navbar/zh.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { NavbarConfig } from 'vuepress'

// 顶部导航栏
export const navbarZh: NavbarConfig = [
{
text: 'Java',
Expand All @@ -12,6 +12,34 @@ export const navbarZh: NavbarConfig = [
'/coding/other/float.md'
]
},
{
text: 'DevOps',
children: [
{
text: 'Linux系列',
children: [
],
},
{
text: 'Docker系列',
children: [
'/coding/docker/info.md'
],
},
{
text: 'Kubernetes系列',
children: [
'/coding/kubernetes/info.md'
],
},
{
text: 'Prometheus系列',
children: [
'/coding/prometheus/info.md'
],
},
]
},
{
text: '读书笔记',
children: [
Expand Down
41 changes: 39 additions & 2 deletions docs/.vuepress/configs/sidebar/zh.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { SidebarConfig } from 'vuepress'

// 左侧菜单
export const sidebarZh: SidebarConfig = {
'/coding/': [
'/coding/java/': [
{
text: 'Java系列',
collapsible:true,
Expand Down Expand Up @@ -36,6 +36,43 @@ export const sidebarZh: SidebarConfig = {
]
}
],
'/coding/linux/': [
{
text: 'Linux系列',
collapsible:false,
children: [
'/coding/linux/info.md',
'/coding/linux/command.md',
]
},
],
'/coding/docker/': [
{
text: 'Docker系列',
collapsible:false,
children: [
'/coding/docker/info.md',
]
},
],
'/coding/kubernetes/': [
{
text: 'Kubernetes系列',
collapsible:false,
children: [
'/coding/kubernetes/info.md',
]
},
],
'/coding/prometheus/': [
{
text: 'Prometheus系列',
collapsible:false,
children: [
'/coding/prometheus/info.md',
]
},
],
'/book/': [
{
text: '技术类书籍',
Expand Down
62 changes: 2 additions & 60 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
home: true
title: 首页
heroImage: /images/hero.png
heroText: 知识的冒险者
tagline: 没有什么不可以
heroText: 多编码,多思考
tagline: 80 岁见
actions:
- text: 马上开刷
link: /coding/java/base.html
Expand All @@ -23,61 +23,3 @@ features:
details: 默认的打包工具是 Vite ,也同样支持 Webpack 。选一个你喜欢的来使用吧!
footer: MIT Licensed | Copyright © 2023-present wu-min
---

### 像数 1, 2, 3 一样容易

<CodeGroup>
<CodeGroupItem title="PNPM" active>

```bash
# 在你的项目中安装
pnpm add -D vuepress@next @vuepress/client@next vue

# 新建一个 markdown 文件
echo '# Hello VuePress' > README.md

# 开始写作
pnpm vuepress dev

# 构建静态文件
pnpm vuepress build
```

</CodeGroupItem>

<CodeGroupItem title="YARN">

```bash
# 在你的项目中安装
yarn add -D vuepress@next

# 新建一个 markdown 文件
echo '# Hello VuePress' > README.md

# 开始写作
yarn vuepress dev

# 构建静态文件
yarn vuepress build
```

</CodeGroupItem>

<CodeGroupItem title="NPM">

```bash
# 在你的项目中安装
npm install -D vuepress@next

# 新建一个 markdown 文件
echo '# Hello VuePress' > README.md

# 开始写作
npx vuepress dev

# 构建静态文件
npx vuepress build
```

</CodeGroupItem>
</CodeGroup>
1 change: 1 addition & 0 deletions docs/coding/docker/info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 入门
1 change: 1 addition & 0 deletions docs/coding/kubernetes/info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 入门
1 change: 1 addition & 0 deletions docs/coding/linux/command.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 命令行
1 change: 1 addition & 0 deletions docs/coding/linux/info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 入门
1 change: 1 addition & 0 deletions docs/coding/prometheus/info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 入门

0 comments on commit 957cd0e

Please sign in to comment.