1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
| import { defaultTheme, defineUserConfig } from 'vuepress' import { prismjsPlugin } from '@vuepress/plugin-prismjs' import { searchPlugin } from '@vuepress/plugin-search' import { backToTopPlugin } from '@vuepress/plugin-back-to-top' import { externalLinkIconPlugin } from '@vuepress/plugin-external-link-icon' import { nprogressPlugin } from '@vuepress/plugin-nprogress' import { nav } from './nav' import { sidebar } from './sidebar' import fullTextSearchPlugin from "vuepress-plugin-full-text-search2"; import { mediumZoomPlugin } from '@vuepress/plugin-medium-zoom' export default defineUserConfig({ lang: 'zh-CN', title: 'maxzhao', description: 'maxzhao', /* 这里要使用绝对路径 */ head: [['link', { rel: 'icon', href: '/guide/images/logo.png' }]], base: '/guide/', dest: 'dist/guide', port: 22222, open: false, theme: defaultTheme({ logo: '/images/home-logo.png', logoDark: '/images/home-logo.png', repo: 'https://gitlab.com/foo/bar', // repoLabel: 'max', navbar:nav, // 侧边栏数组 // 所有页面会使用相同的侧边栏 sidebar: sidebar, backToHome:'Back to home' }), plugins: [ fullTextSearchPlugin({ locales: { '/': { placeholder: 'Search', }, '/zh/': { placeholder: '搜索', }, }, }), // 返回顶部 按钮 backToTopPlugin(), //语法高亮 prismjsPlugin({ // 配置项
}), // Markdown 内容中的外部链接添加一个图标 externalLinkIconPlugin({ // 配置项 locales: { '/': { openInNewWindow: 'open in new window', }, '/zh/': { openInNewWindow: '在新窗口打开', }, }, }), // 页面进度条 nprogressPlugin(), mediumZoomPlugin({ // 配置项 }), ], })
|