This repository has been archived on 2025-06-28. You can view files and clone it, but cannot push or open issues or pull requests.
Files
vitepress-theme-blog-charle…/docs/.vitepress/config/theme.ts
2022-08-13 23:30:56 +08:00

62 lines
2.1 KiB
TypeScript

import DefaultTheme from 'vitepress/theme'
import { nav } from './nav'
import { sidebar } from './sidebar'
export const themeConfig: DefaultTheme.Config = {
nav, // 导航栏配置
sidebar, // 侧边栏配置
logo: '/logo.png',
outlineTitle: '目录', // 右侧边栏的大纲标题文本配置
lastUpdatedText: '最后更新', // 最后更新时间文本配置, 需先配置lastUpdated为true
// 文档页脚文本配置
docFooter: {
prev: '上一篇',
next: '下一篇'
},
// 编辑链接配置
editLink: {
pattern: 'https://github.com/Charles7c/charles7c.github.io/edit/main/repos/:path',
text: '不妥之处,敬请雅正'
},
// 全文搜索配置
algolia: {
appId: 'DBZ0G9HBUY',
apiKey: '00cef480a543003d05d9808110ea5f65',
indexName: 'charles7c'
},
// 导航栏右侧社交链接配置
socialLinks: [
{ icon: 'github', link: 'https://github.com/Charles7c/charles7c.github.io' }
],
// 自定义扩展: 页脚配置
footerConfig: {
showFooter: true, // 是否显示页脚
icpRecordCode: '津ICP备2022005864号-2', // ICP备案号
publicSecurityRecordCode: '津公网安备12011202000677号', // 联网备案号
copyright: `Copyright © 2019-${new Date().getFullYear()} Charles7c` // 版权信息
},
// 自定义扩展: 文章元数据配置
articleMetadataConfig: {
author: '查尔斯', // 文章全局默认作者名称
authorLink: '/about/me', // 点击作者名时默认跳转的链接
showPv: false // 是否显示文章阅读数, 需配置好相应后端API接口
},
// 自定义扩展: 评论配置
commentConfig: {
type: 'gitalk',
options: {
clientID: '1de126ce1fbdbe049709',
clientSecret: '035fe49874a43e5cefc28a99b7e40b1925319c62',
repo: 'charles7c.github.io-comments',
owner: 'Charles7c',
admin: ['Charles7c'],
language: 'zh-CN',
distractionFreeMode: false,
// 默认: https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token
proxy: 'https://cors-server-ecru.vercel.app/github_access_token'
},
showComment: true // 是否显示评论
}
}