import { defineConfig } from 'vitepress' import { base } from '../env.mts' import { sidebar } from '../sidebar.mts' import { nav } from '../nav.mts' import { GitChangelog, GitChangelogMarkdownSection, } from '@nolebase/vitepress-plugin-git-changelog/vite' // import { // InlineLinkPreviewElementTransform // } from '@nolebase/vitepress-plugin-inline-link-preview/markdown-it' // https://vitepress.dev/reference/site-config export default defineConfig({ vite: { server: { port: 5678, }, plugins: [ // [配置] 基于 Git 的页面历史 GitChangelog({ // 填写在此处填写您的仓库链接 repoURL: () => 'https://github.com/coder-xiaomo/tutorials', }), GitChangelogMarkdownSection(), ], optimizeDeps: { exclude: [ // [配置] 行内链接预览 // '@nolebase/vitepress-plugin-inline-link-preview/client', // [配置] 阅读增强 '@nolebase/vitepress-plugin-enhanced-readabilities/client', 'vitepress', '@nolebase/ui', ], }, ssr: { noExternal: [ // 如果还有别的依赖需要添加的话,并排填写和配置到这里即可 // // [配置] 行内链接预览 // '@nolebase/vitepress-plugin-inline-link-preview', // [配置] 阅读增强 '@nolebase/vitepress-plugin-enhanced-readabilities', '@nolebase/ui', // [配置] @theojs/lumen // issue: https://github.com/Theo-Messi/lumen/issues/234 'dayjs', ], }, }, title: "就这么弄 (🚧 施工中)", description: "简单步骤与实用技巧", base: base, locales: { root: { label: '简体中文', lang: 'zh-CN', } }, themeConfig: { // https://vitepress.dev/reference/default-theme-config logo: { src: '/assets/logo.svg', }, nav: nav, sidebar: sidebar, editLink: { text: '在 GitHub 上编辑此页面', pattern: 'https://github.com/coder-xiaomo/tutorials/edit/main/docs/:path', }, socialLinks: [ // { icon: 'github', link: 'https://github.com/vuejs/vitepress' } { // GitHub repo icon: { svg: `` }, link: 'https://github.com/coder-xiaomo/tutorials', }, { // Gitee repo // https://gitee.com/static/images/logo-en.svg icon: { svg: `` }, link: 'https://gitee.com/coder-xiaomo/tutorials', }, { // Gitcode repo icon: { svg: `` }, link: 'https://gitcode.com/coder-xiaomo/tutorials', }, ], search: { provider: 'local' }, docFooter: { prev: '上一篇', next: '下一篇' }, outline: { label: '页面导航' }, lastUpdated: { text: '最近更新', formatOptions: { dateStyle: 'medium', timeStyle: 'short', } }, langMenuLabel: '多语言', returnToTopLabel: '回到顶部', sidebarMenuLabel: '菜单', darkModeSwitchLabel: '主题', lightModeSwitchTitle: '切换到浅色模式', darkModeSwitchTitle: '切换到深色模式' }, // markdown: { // config(md) { // // 其他 markdown-it 配置... // // // [配置] 行内链接预览 // // refer: https://nolebase-integrations.ayaka.io/pages/zh-CN/integrations/vitepress-plugin-inline-link-preview/getting-started // md.use(InlineLinkPreviewElementTransform) // } // }, })