Skip to content

Commit

Permalink
feat: setup navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleSound committed Nov 30, 2023
1 parent d6bbbf2 commit e424d8b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { defineConfig } from 'vitepress'
import { configNav } from './nav'

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "RLE.wiki",
description: "一份RLE指北",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Home', link: '/' },
{ text: 'Examples', link: '/markdown-examples' }
],
nav: configNav,

sidebar: [
{
Expand All @@ -22,7 +20,7 @@ export default defineConfig({
],

socialLinks: [
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }
{ icon: 'github', link: 'https://github.com/project-trans/RLE-wiki' }
]
}
})
20 changes: 20 additions & 0 deletions docs/.vitepress/nav.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// import { navbar } from "vuepress-theme-hope";
import { DefaultTheme } from 'vitepress'

export const configNav: DefaultTheme.Config['nav'] = [
{ text: "大学指南",
link: "/campus/readme.md"
},
{
text: "Fashion",
link: "/fashion/readme.md"
},
{
text: "贡献指南",
items: [
{ text: "校园版块投稿指南", link: "/contributor-guide/campus.md" },
{ text: "其他投稿指南", link: "/contributor-guide/other.md" },
{ text: "校园版块贡献模板", link: "/contributor-guide/CampusTemplate.md" },
],
},
];

0 comments on commit e424d8b

Please sign in to comment.