优化:初步优化全局代码样式
This commit is contained in:
@@ -1,15 +1,20 @@
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import { nav } from './nav'
|
||||
import { sidebar } from './sidebar'
|
||||
import type { DefaultTheme } from 'vitepress';
|
||||
import { nav } from './nav';
|
||||
import { sidebar } from './sidebar';
|
||||
|
||||
export const themeConfig: DefaultTheme.Config = {
|
||||
nav, // 导航栏配置
|
||||
sidebar, // 侧边栏配置
|
||||
|
||||
logo: '/logo.png',
|
||||
outline: 'deep', // 右侧大纲标题层级
|
||||
outlineTitle: '目录', // 右侧大纲标题文本配置
|
||||
outline: {
|
||||
level: 'deep', // 右侧大纲标题层级
|
||||
label: '目录', // 右侧大纲标题文本配置
|
||||
},
|
||||
outlineBadges: false, // 是否在大纲中显示 Badge 文本
|
||||
darkModeSwitchLabel: '切换日光/暗黑模式',
|
||||
sidebarMenuLabel: '文章',
|
||||
returnToTopLabel: '返回顶部',
|
||||
lastUpdatedText: '最后更新', // 最后更新时间文本配置, 需先配置lastUpdated为true
|
||||
// 文档页脚文本配置
|
||||
docFooter: {
|
||||
@@ -60,10 +65,11 @@ export const themeConfig: DefaultTheme.Config = {
|
||||
],
|
||||
|
||||
// 自定义扩展: 文章元数据配置
|
||||
// @ts-ignore
|
||||
articleMetadataConfig: {
|
||||
author: '查尔斯', // 文章全局默认作者名称
|
||||
authorLink: '/about/me', // 点击作者名时默认跳转的链接
|
||||
showViewCount: true // 是否显示文章阅读数, 需要在 docs/.vitepress/theme/api/config.js 及 interface.js 配置好相应 API 接口
|
||||
showViewCount: true, // 是否显示文章阅读数, 需要在 docs/.vitepress/theme/api/config.js 及 interface.js 配置好相应 API 接口
|
||||
},
|
||||
// 自定义扩展: 文章版权配置
|
||||
copyrightConfig: {
|
||||
|
Reference in New Issue
Block a user