import { defineConfigWithTheme } from 'vitepress' // @ts-ignore import mdItCustomAttrs from 'markdown-it-custom-attrs' export interface ThemeConfig { //navBar menuList: { name: string; url: string }[] //banner videoBanner: boolean name: string welcomeText: string motto: string[] social: { icon: string; url: string }[] //spine spineVoiceLang: 'zh' | 'jp' //footer footerName: string poweredList: { name: string; url: string }[] //gitalk clientID: string clientSecret: string repo: string owner: string admin: string[] } export default defineConfigWithTheme({ lang: 'zh-CN', head: [ ['link', { rel: 'shortcut icon', href: '/favicon.ico' }], // gitalk ['link', { rel: 'stylesheet', href: 'https://unpkg.com/gitalk/dist/gitalk.css' }], ['script', { src: 'https://unpkg.com/gitalk/dist/gitalk.min.js' }], // bluearchive font [ 'link', { rel: 'stylesheet', href: '/font/Blueaka/Blueaka.css', }, ], [ 'link', { rel: 'stylesheet', href: '/font/Blueaka_Bold/Blueaka_Bold.css', }, ], // 图片灯箱 [ 'link', { rel: 'stylesheet', href: 'https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css', }, ], [ 'script', { src: 'https://cdn.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.umd.js', }, ], ], ignoreDeadLinks: true, // 生成站点地图 sitemap: { hostname: 'https://home.gtuantuan.online:9443', }, title: "TuanTuan's 部落格", description: "TuanTuan's 部落格", themeConfig: { // navBar menuList: [ { name: '首页', url: '' }, { name: '标签', url: 'tags/' }, ], //banner区配置 videoBanner: false, name: "TuanTuan's 部落格", welcomeText: 'Hello World', motto: ['与你的日常,就是奇迹!', '邦邦咔邦!'], social: [ { icon: 'github', url: 'https://github.com/' }, { icon: 'bilibili', url: 'https://www.bilibili.com/' }, { icon: 'qq', url: 'https://im.qq.com/index/' }, { icon: 'wechat', url: 'https://weixin.qq.com/' }, ], //spine语音配置,可选zh/jp spineVoiceLang: 'jp', //footer配置 footerName: 'TuanTuan', poweredList: [ { name: 'VitePress', url: 'https://github.com/vuejs/vitepress' }, { name: 'GitHub Pages', url: 'https://docs.github.com/zh/pages' }, ], // ↓↓↓ 在这里添加 Gitalk 配置 ↓↓↓ clientID: 'Ov23liDGj2h0vONdtdBr', clientSecret: '74b862f6d47dadb44ad0f6f057146363eff1570d', repo: 'gtuantuan-comments', owner: 'GTuanTuan', admin: ['GTuanTuan'], // //gitalk配置 // clientID: 'Ov23lia9U9wFN3WMyoKK', // clientSecret: 'b2418ab598c188c43a247c99e728dd2735d58c3b', // repo: 'vitepress-theme-bluearchive', // owner: 'Alittfre', // admin: ['Alittfre'], }, markdown: { theme: 'solarized-dark', lineNumbers: true, math: true, config: (md) => { // use more markdown-it plugins! md.use(mdItCustomAttrs, 'image', { 'data-fancybox': 'gallery', }) }, }, })