|
1 | 1 | import { defineConfig } from 'vitepress' |
2 | 2 |
|
3 | 3 | const head = [ |
4 | | - ["link", { rel: "icon", href: "/favicon.ico" }], |
5 | | - ["link", { rel: "manifest", href: "/site.webmanifest" }], |
| 4 | + ['link', { rel: 'icon', href: '/favicon.ico' }], |
| 5 | + ['link', { rel: 'manifest', href: '/site.webmanifest' }], |
6 | 6 | ] |
7 | 7 |
|
8 | 8 | if (process.env.NODE_ENV === 'production') { |
9 | | - head.push( |
10 | | - [ |
11 | | - "script", |
12 | | - { |
13 | | - async: "", |
14 | | - src: "https://www.googletagmanager.com/gtag/js?id=G-7KBNJR8LJ3", |
15 | | - }, |
16 | | - ], |
17 | | - ) |
18 | | - head.push( |
19 | | - [ |
20 | | - "script", |
21 | | - {}, |
22 | | - `window.dataLayer = window.dataLayer || []; |
| 9 | + head.push([ |
| 10 | + 'script', |
| 11 | + { |
| 12 | + async: '', |
| 13 | + src: 'https://www.googletagmanager.com/gtag/js?id=G-7KBNJR8LJ3', |
| 14 | + }, |
| 15 | + ]) |
| 16 | + head.push([ |
| 17 | + 'script', |
| 18 | + {}, |
| 19 | + `window.dataLayer = window.dataLayer || []; |
23 | 20 | function gtag(){dataLayer.push(arguments);} |
24 | 21 | gtag('js', new Date()); |
25 | 22 | gtag('config', 'G-7KBNJR8LJ3');`, |
26 | | - ], |
27 | | - ) |
| 23 | + ]) |
28 | 24 |
|
29 | | - head.push( |
30 | | - [ |
31 | | - "script", |
32 | | - {}, |
33 | | - `var _hmt = _hmt || []; |
| 25 | + head.push([ |
| 26 | + 'script', |
| 27 | + {}, |
| 28 | + `var _hmt = _hmt || []; |
34 | 29 | (function() { |
35 | 30 | var hm = document.createElement("script"); |
36 | 31 | hm.src = "https://hm.baidu.com/hm.js?cf025a6c77712bb71c5407558d3bd6b7"; |
37 | 32 | var s = document.getElementsByTagName("script")[0]; |
38 | 33 | s.parentNode.insertBefore(hm, s); |
39 | 34 | })();`, |
40 | | - ], |
41 | | - ) |
| 35 | + ]) |
42 | 36 | } |
43 | 37 |
|
44 | 38 | // https://vitepress.dev/reference/site-config |
45 | 39 | export default defineConfig({ |
46 | | - title: "Maicss", |
| 40 | + title: 'Maicss', |
47 | 41 | description: "Miacss' website pyqt 中文 教程 pyqt5 pyqt6", |
48 | 42 | head, |
49 | | - lang: "zh-CN", |
| 43 | + lang: 'zh-CN', |
50 | 44 | cleanUrls: true, |
51 | 45 | themeConfig: { |
52 | 46 | outline: { |
53 | | - label: "TOC", |
| 47 | + label: 'TOC', |
54 | 48 | }, |
55 | | - returnToTopLabel: "返回顶部", |
| 49 | + returnToTopLabel: '返回顶部', |
56 | 50 | docFooter: { |
57 | | - prev: "上一篇", |
58 | | - next: "下一篇", |
| 51 | + prev: '上一篇', |
| 52 | + next: '下一篇', |
59 | 53 | }, |
60 | 54 | editLink: { |
61 | | - pattern: "https://github.com/maicss/weisite/edit/main/docs/:path", |
62 | | - text: "在GitHub上编辑此页面", |
| 55 | + pattern: 'https://github.com/maicss/weisite/edit/main/docs/:path', |
| 56 | + text: '在GitHub上编辑此页面', |
63 | 57 | }, |
64 | 58 | siteTitle: "Miacss' website", |
65 | 59 | nav: [ |
66 | | - { text: "首页", link: "/" }, |
67 | | - { text: "leetcode", link: "/leetcode/" }, |
68 | | - { text: "PyQT 教程", link: "/pyqt/" }, |
69 | | - { text: "Blog", link: "/blog/" }, |
70 | | - { text: "geeker Admin", link: "/geeker-admin/" }, |
| 60 | + { text: '首页', link: '/' }, |
| 61 | + { text: 'Leetcode', link: '/leetcode/' }, |
| 62 | + { text: 'PyQT 教程', link: '/pyqt/' }, |
| 63 | + { text: 'Blog', link: '/blog/' }, |
| 64 | + { text: 'Geeker Admin', link: '/geeker-admin/' }, |
71 | 65 | ], |
72 | | - logo: { src: "/logo.png", alt: "maicss' website logo" }, |
| 66 | + logo: { src: '/logo.png', alt: "maicss' website logo" }, |
73 | 67 | i18nRouting: false, |
74 | 68 | sidebar: { |
75 | | - "/pyqt/": [ |
| 69 | + '/pyqt/': [ |
76 | 70 | { |
77 | | - text: "PyQt 教程", link: '/pyqt/', |
| 71 | + text: 'PyQt 教程', |
| 72 | + link: '/pyqt/', |
78 | 73 | items: [ |
79 | 74 | { |
80 | | - text: "PyQt6", |
| 75 | + text: 'PyQt6', |
81 | 76 | items: [ |
82 | | - { text: "介绍", link: "/pyqt/v6/" }, |
83 | | - { text: "日期和时间", link: "/pyqt/v6/datetime" }, |
84 | | - { text: "第一个程序", link: "/pyqt/v6/firstProgram" }, |
85 | | - { text: "菜单和工具栏", link: "/pyqt/v6/menusAndToolbars" }, |
86 | | - { text: "布局管理", link: "/pyqt/v6/layout" }, |
87 | | - { text: "事件和信号", link: "/pyqt/v6/eventsAndSignals" }, |
88 | | - { text: "对话框", link: "/pyqt/v6/dialogs" }, |
89 | | - { text: "组件(一)", link: "/pyqt/v6/widgets1" }, |
90 | | - { text: "组件(二)", link: "/pyqt/v6/widgets2" }, |
91 | | - { text: "拖放", link: "/pyqt/v6/DND" }, |
92 | | - { text: "绘画", link: "/pyqt/v6/painting" }, |
93 | | - { text: "自定义组件", link: "/pyqt/v6/customWidgets" }, |
94 | | - { text: "俄罗斯方块游戏", link: "/pyqt/v6/tetris" }, |
| 77 | + { text: '介绍', link: '/pyqt/v6/' }, |
| 78 | + { text: '日期和时间', link: '/pyqt/v6/datetime' }, |
| 79 | + { text: '第一个程序', link: '/pyqt/v6/firstProgram' }, |
| 80 | + { text: '菜单和工具栏', link: '/pyqt/v6/menusAndToolbars' }, |
| 81 | + { text: '布局管理', link: '/pyqt/v6/layout' }, |
| 82 | + { text: '事件和信号', link: '/pyqt/v6/eventsAndSignals' }, |
| 83 | + { text: '对话框', link: '/pyqt/v6/dialogs' }, |
| 84 | + { text: '组件(一)', link: '/pyqt/v6/widgets1' }, |
| 85 | + { text: '组件(二)', link: '/pyqt/v6/widgets2' }, |
| 86 | + { text: '拖放', link: '/pyqt/v6/DND' }, |
| 87 | + { text: '绘画', link: '/pyqt/v6/painting' }, |
| 88 | + { text: '自定义组件', link: '/pyqt/v6/customWidgets' }, |
| 89 | + { text: '俄罗斯方块游戏', link: '/pyqt/v6/tetris' }, |
95 | 90 | ], |
96 | 91 | }, |
97 | 92 | { |
98 | | - text: "PyQt5", |
| 93 | + text: 'PyQt5', |
99 | 94 | items: [ |
100 | | - { text: "介绍", link: "/pyqt/v5/" }, |
101 | | - { text: "日期和时间", link: "/pyqt/v5/datetime" }, |
102 | | - { text: "第一个程序", link: "/pyqt/v5/firstProgram" }, |
103 | | - { text: "菜单和工具栏", link: "/pyqt/v5/menusAndToolbars" }, |
104 | | - { text: "布局管理", link: "/pyqt/v5/layout" }, |
105 | | - { text: "事件和信号", link: "/pyqt/v5/eventsAndSignals" }, |
106 | | - { text: "对话框", link: "/pyqt/v5/dialogs" }, |
107 | | - { text: "组件(一)", link: "/pyqt/v5/widgets1" }, |
108 | | - { text: "组件(二)", link: "/pyqt/v5/widgets2" }, |
109 | | - { text: "拖放", link: "/pyqt/v5/DND" }, |
110 | | - { text: "绘画", link: "/pyqt/v5/painting" }, |
111 | | - { text: "自定义组件", link: "/pyqt/v5/customWidgets" }, |
112 | | - { text: "俄罗斯方块游戏", link: "/pyqt/v5/tetris" }, |
| 95 | + { text: '介绍', link: '/pyqt/v5/' }, |
| 96 | + { text: '日期和时间', link: '/pyqt/v5/datetime' }, |
| 97 | + { text: '第一个程序', link: '/pyqt/v5/firstProgram' }, |
| 98 | + { text: '菜单和工具栏', link: '/pyqt/v5/menusAndToolbars' }, |
| 99 | + { text: '布局管理', link: '/pyqt/v5/layout' }, |
| 100 | + { text: '事件和信号', link: '/pyqt/v5/eventsAndSignals' }, |
| 101 | + { text: '对话框', link: '/pyqt/v5/dialogs' }, |
| 102 | + { text: '组件(一)', link: '/pyqt/v5/widgets1' }, |
| 103 | + { text: '组件(二)', link: '/pyqt/v5/widgets2' }, |
| 104 | + { text: '拖放', link: '/pyqt/v5/DND' }, |
| 105 | + { text: '绘画', link: '/pyqt/v5/painting' }, |
| 106 | + { text: '自定义组件', link: '/pyqt/v5/customWidgets' }, |
| 107 | + { text: '俄罗斯方块游戏', link: '/pyqt/v5/tetris' }, |
113 | 108 | ], |
114 | 109 | }, |
115 | 110 | ], |
116 | 111 | }, |
117 | 112 | ], |
118 | | - "/geeker-admin/": [ |
| 113 | + '/geeker-admin/': [ |
119 | 114 | { |
120 | | - text: "Geeker Admin", link: '/geeker-admin/', |
| 115 | + text: 'Geeker Admin', |
| 116 | + link: '/geeker-admin/', |
121 | 117 | items: [ |
122 | | - { text: "介绍", link: "/geeker-admin/introduce" }, |
123 | | - { text: "目录结构", link: "/geeker-admin/catalogue" }, |
124 | | - { text: "路由、菜单", link: "/geeker-admin/router" }, |
125 | | - { text: "权限管理", link: "/geeker-admin/auth" }, |
126 | | - { text: "网络请求", link: "/geeker-admin/request" }, |
127 | | - { text: "构建、部署", link: "/geeker-admin/build" }, |
128 | | - { text: "项目规范", link: "/geeker-admin/standard" }, |
129 | | - { text: "主题配置", link: "/geeker-admin/theme" }, |
130 | | - { text: "布局模式", link: "/geeker-admin/layout" }, |
131 | | - { text: "常见问题", link: "/geeker-admin/faq" }, |
| 118 | + { text: '介绍', link: '/geeker-admin/introduce' }, |
| 119 | + { text: '目录结构', link: '/geeker-admin/catalogue' }, |
| 120 | + { text: '高级表格', link: '/geeker-admin/pro-table' }, |
| 121 | + { text: '路由、菜单', link: '/geeker-admin/router' }, |
| 122 | + { text: '权限管理', link: '/geeker-admin/auth' }, |
| 123 | + { text: '网络请求', link: '/geeker-admin/request' }, |
| 124 | + { text: '构建、部署', link: '/geeker-admin/build' }, |
| 125 | + { text: '项目规范', link: '/geeker-admin/standard' }, |
| 126 | + { text: '主题配置', link: '/geeker-admin/theme' }, |
| 127 | + { text: '布局模式', link: '/geeker-admin/layout' }, |
| 128 | + { text: '常见问题', link: '/geeker-admin/faq' }, |
132 | 129 | ], |
133 | | - } |
134 | | - ] |
| 130 | + }, |
| 131 | + ], |
135 | 132 | }, |
136 | | - socialLinks: [{ icon: "github", link: "https://github.com/maicss" }], |
| 133 | + socialLinks: [{ icon: 'github', link: 'https://github.com/maicss' }], |
137 | 134 | footer: { |
138 | 135 | // message: 'Released under the MIT License.', |
139 | | - copyright: "Copyright © 2019-present Maicss", |
| 136 | + copyright: 'Copyright © 2019-present Maicss', |
140 | 137 | }, |
141 | 138 | search: { |
142 | | - provider: 'local' |
| 139 | + provider: 'local', |
143 | 140 | }, |
144 | 141 |
|
145 | 142 | // carbonAds: { |
146 | 143 | // code: 'your-carbon-code', |
147 | 144 | // placement: 'your-carbon-placement' |
148 | 145 | // }, |
149 | 146 | lastUpdated: { |
150 | | - text: "更新时间", |
| 147 | + text: '更新时间', |
151 | 148 | }, |
152 | 149 | }, |
153 | 150 | sitemap: { |
154 | | - hostname: "https://maicss.com", |
| 151 | + hostname: 'https://maicss.com', |
155 | 152 | }, |
156 | 153 | markdown: { |
157 | 154 | image: { |
158 | | - lazyLoading: true |
159 | | - } |
| 155 | + lazyLoading: true, |
| 156 | + }, |
160 | 157 | }, |
161 | 158 | vite: { |
162 | 159 | build: { |
163 | 160 | rollupOptions: { |
164 | 161 | output: { |
165 | | - assetFileNames: `assets/[name].[ext]` |
166 | | - } |
167 | | - } |
168 | | - } |
| 162 | + assetFileNames: `assets/[name].[ext]`, |
| 163 | + }, |
| 164 | + }, |
| 165 | + }, |
169 | 166 | }, |
170 | 167 | // buildEnd: genFeed |
171 | 168 | }) |
0 commit comments