|
| 1 | +import { defineConfig } from 'vitepress' |
| 2 | + |
| 3 | +// https://vitepress.dev/reference/site-config |
| 4 | +export default defineConfig({ |
| 5 | + lang: 'zh-Hans', |
| 6 | + title: 'Python 3 源码分析', |
| 7 | + description: '致力于分析 Python 3.7.0 的源码实现', |
| 8 | + |
| 9 | + // 部署在 https://flaggo.github.io/python3-source-code-analysis/ |
| 10 | + base: '/python3-source-code-analysis/', |
| 11 | + |
| 12 | + // 用仓库根目录作为内容源;README.md 作为首页 |
| 13 | + srcDir: '.', |
| 14 | + rewrites: { |
| 15 | + 'README.md': 'index.md' |
| 16 | + }, |
| 17 | + // 不作为页面渲染的文件 / 旧构建产物 |
| 18 | + srcExclude: ['SUMMARY.md', '_book/**', '**/node_modules/**'], |
| 19 | + |
| 20 | + lastUpdated: true, |
| 21 | + cleanUrls: true, |
| 22 | + ignoreDeadLinks: true, |
| 23 | + |
| 24 | + markdown: { |
| 25 | + lineNumbers: true |
| 26 | + }, |
| 27 | + |
| 28 | + themeConfig: { |
| 29 | + // https://vitepress.dev/reference/default-theme-config |
| 30 | + nav: [ |
| 31 | + { text: '首页', link: '/' }, |
| 32 | + { text: '大纲', link: '/objects/object/' } |
| 33 | + ], |
| 34 | + |
| 35 | + sidebar: [ |
| 36 | + { |
| 37 | + text: '第 1 部分:序章', |
| 38 | + items: [ |
| 39 | + { text: '前言', link: '/' }, |
| 40 | + { text: 'Python 源代码的组织', link: '/preface/code-organization/' }, |
| 41 | + { text: 'Windows 环境下编译 Python', link: '/preface/windows-build/' }, |
| 42 | + { text: 'UNIX/Linux 环境下编译 Python', link: '/preface/unix-linux-build/' }, |
| 43 | + { text: '修改 Python 源码', link: '/preface/modify-code/' } |
| 44 | + ] |
| 45 | + }, |
| 46 | + { |
| 47 | + text: '第 2 部分:Python 内建对象', |
| 48 | + items: [ |
| 49 | + { text: 'Python 对象初探', link: '/objects/object/' }, |
| 50 | + { text: 'Python 整数对象', link: '/objects/long-object/' }, |
| 51 | + { text: 'Python 字符串对象', link: '/objects/str-object/' }, |
| 52 | + { text: 'Python List 对象', link: '/objects/list-object/' }, |
| 53 | + { text: 'Python Dict 对象', link: '/objects/dict-object/' }, |
| 54 | + { text: 'Python Set 对象', link: '/objects/set-object/' }, |
| 55 | + { text: '实现简版 Python', link: '/objects/simple-interpreter/' } |
| 56 | + ] |
| 57 | + }, |
| 58 | + { |
| 59 | + text: '第 3 部分:Python 虚拟机', |
| 60 | + items: [ |
| 61 | + { text: '(编写中…)', link: '/' } |
| 62 | + ] |
| 63 | + } |
| 64 | + ], |
| 65 | + |
| 66 | + socialLinks: [ |
| 67 | + { icon: 'github', link: 'https://github.com/flaggo/python3-source-code-analysis' } |
| 68 | + ], |
| 69 | + |
| 70 | + search: { |
| 71 | + provider: 'local' |
| 72 | + }, |
| 73 | + |
| 74 | + editLink: { |
| 75 | + pattern: 'https://github.com/flaggo/python3-source-code-analysis/edit/master/:path', |
| 76 | + text: '编辑此页面' |
| 77 | + }, |
| 78 | + |
| 79 | + outline: { |
| 80 | + label: '本页目录', |
| 81 | + level: [2, 3] |
| 82 | + }, |
| 83 | + |
| 84 | + docFooter: { |
| 85 | + prev: '上一篇', |
| 86 | + next: '下一篇' |
| 87 | + }, |
| 88 | + |
| 89 | + lastUpdated: { |
| 90 | + text: '最后更新于' |
| 91 | + }, |
| 92 | + |
| 93 | + footer: { |
| 94 | + copyright: 'Copyright © FlagGo 2019-2026' |
| 95 | + }, |
| 96 | + |
| 97 | + darkModeSwitchLabel: '主题', |
| 98 | + returnToTopLabel: '回到顶部', |
| 99 | + sidebarMenuLabel: '菜单' |
| 100 | + } |
| 101 | +}) |
0 commit comments