File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #! /bin/sh
2- . " $( dirname " $0 " ) /_/husky.sh"
3-
41pnpm format:staged
Original file line number Diff line number Diff line change 1- import type { DefaultThemeOptions } from 'vuepress' ;
1+ import { viteBundler } from '@vuepress/bundler-vite' ;
2+ import { defaultTheme } from '@vuepress/theme-default' ;
23import { defineUserConfig } from 'vuepress' ;
34import { navbar , sidebar } from './configs' ;
45
5- export default defineUserConfig < DefaultThemeOptions > ( {
6+ export default defineUserConfig ( {
67 // 站点配置
78 lang : 'zh-CN' ,
89 title : 'Distributed Update System' ,
@@ -23,9 +24,11 @@ export default defineUserConfig<DefaultThemeOptions>({
2324 } ,
2425 } ,
2526
27+ // 打包工具
28+ bundler : viteBundler ( ) ,
29+
2630 // 主题配置
27- theme : '@vuepress/theme-default' ,
28- themeConfig : {
31+ theme : defaultTheme ( {
2932 logo : '/logo.png' ,
3033 repo : 'DUpdateSystem' ,
3134 locales : {
@@ -60,7 +63,7 @@ export default defineUserConfig<DefaultThemeOptions>({
6063
6164 // a11y
6265 openInNewWindow : '在新窗口打开' ,
63- toggleDarkMode : '切换夜间模式 ' ,
66+ toggleColorMode : '切换颜色模式 ' ,
6467 toggleSidebar : '切换侧边栏' ,
6568 } ,
6669
@@ -79,5 +82,7 @@ export default defineUserConfig<DefaultThemeOptions>({
7982
8083 docsRepo : 'DUpdateSystem/docs' ,
8184 docsBranch : 'master' ,
82- } ,
85+ colorMode : 'dark' ,
86+ colorModeSwitch : true ,
87+ } ) ,
8388} ) ;
Original file line number Diff line number Diff line change 1- import type { NavbarConfig } from '@vuepress/theme-default' ;
1+ import type { NavbarOptions } from '@vuepress/theme-default' ;
22
3- export const en : NavbarConfig = [
3+ export const en : NavbarOptions = [
44 { text : 'User Guide' , link : '/en/guide/' } ,
55 { text : 'FAQ' , link : '/en/faq/' } ,
66 { text : 'Developer Documentation' , link : '/en/dev/' } ,
Original file line number Diff line number Diff line change 1- import type { NavbarConfig } from '@vuepress/theme-default' ;
1+ import type { NavbarOptions } from '@vuepress/theme-default' ;
22
3- export const zh : NavbarConfig = [
3+ export const zh : NavbarOptions = [
44 { text : '用户指南' , link : '/guide/' } ,
55 { text : '常见问题' , link : '/faq/' } ,
66 { text : '开发者文档' , link : '/dev/' } ,
Original file line number Diff line number Diff line change 1- import type { SidebarConfig } from '@vuepress/theme-default' ;
1+ import type { SidebarOptions } from '@vuepress/theme-default' ;
22
3- export const en : SidebarConfig = [
3+ export const en : SidebarOptions = [
44 '/en/guide/README.md' ,
55 '/en/faq/README.md' ,
66 {
Original file line number Diff line number Diff line change 1- import type { SidebarConfig } from '@vuepress/theme-default' ;
1+ import type { SidebarOptions } from '@vuepress/theme-default' ;
22
3- export const zh : SidebarConfig = [
3+ export const zh : SidebarOptions = [
44 '/guide/README.md' ,
55 '/faq/README.md' ,
66 {
You can’t perform that action at this time.
0 commit comments