|
| 1 | +import { viteBundler } from '@vuepress/bundler-vite'; |
| 2 | +import { defineUserConfig } from 'vuepress'; |
| 3 | +import { logoPath, repoBase, repoName, repoUrl } from './params'; |
| 4 | +import { hopeTheme, mdEnhance } from 'vuepress-theme-hope'; |
| 5 | +import { searchProPlugin } from 'vuepress-plugin-search-pro'; |
| 6 | + |
| 7 | +const tutorialPath = '/md/'; |
| 8 | +const srcCodePath = tutorialPath + '详细分析/'; |
| 9 | + |
| 10 | +export default defineUserConfig({ |
| 11 | + base: repoBase + '/', |
| 12 | + title: repoName, |
| 13 | + description: repoName, |
| 14 | + lang: 'zh-CN', |
| 15 | + theme: hopeTheme({ |
| 16 | + sidebar: [ |
| 17 | + { text: '首页', link: '/', }, |
| 18 | + { text: '基本概念', link: tutorialPath + '01基本概念', }, |
| 19 | + { text: '使用线程', link: tutorialPath + '02使用线程', }, |
| 20 | + { text: '共享数据', link: tutorialPath + '03共享数据', }, |
| 21 | + { text: '同步操作', link: tutorialPath + '04同步操作', }, |
| 22 | + { |
| 23 | + text: '详细分析', link: srcCodePath, |
| 24 | + collapsible: true, |
| 25 | + children: [ |
| 26 | + { text: 'std::thread 的构造-源码解析', link: srcCodePath + '01thread的构造与源码解析', }, |
| 27 | + { text: 'std::scoped_lock 的源码实现与解析', link: srcCodePath + '02scoped_lock源码解析', }, |
| 28 | + { text: 'std::async 与 std::future 源码解析', link: srcCodePath + '03async与future源码解析', }, |
| 29 | + ] |
| 30 | + }, |
| 31 | + ], |
| 32 | + favicon: logoPath, |
| 33 | + logo: logoPath, |
| 34 | + navTitle: repoName, |
| 35 | + repo: repoUrl, |
| 36 | + editLinkPattern: repoUrl + 'blob/main/:path', |
| 37 | + contributors: false, |
| 38 | + darkmode: 'toggle', |
| 39 | + pageInfo: ['ReadingTime'], |
| 40 | + }), |
| 41 | + plugins: [ |
| 42 | + mdEnhance({ |
| 43 | + footnote: true, |
| 44 | + imgLazyload: true |
| 45 | + }), |
| 46 | + searchProPlugin({ |
| 47 | + indexContent: true, |
| 48 | + autoSuggestions: true |
| 49 | + }) |
| 50 | + ], |
| 51 | + |
| 52 | + bundler: viteBundler({}), |
| 53 | +}) |
0 commit comments