|
| 1 | +import { defineConfig, DefaultTheme } from 'vitepress' |
| 2 | + |
| 3 | +const Guides: DefaultTheme.NavItemWithLink[] = [ |
| 4 | + { text: '介绍', link: '/guide/' }, |
| 5 | +] |
| 6 | + |
| 7 | +const vue3VantMobile: DefaultTheme.NavItemWithLink[] = [ |
| 8 | + { text: '概述', link: '/vue3-vant-mobile/' }, |
| 9 | +] |
| 10 | + |
| 11 | +const vue3VarletMobile: DefaultTheme.NavItemWithLink[] = [ |
| 12 | + { text: '概述', link: '/vue3-varlet-mobile/' }, |
| 13 | +] |
| 14 | + |
| 15 | +const nuxt3VantMobile: DefaultTheme.NavItemWithLink[] = [ |
| 16 | + { text: '概述', link: '/nuxt3-vant-mobile/' }, |
| 17 | +] |
| 18 | + |
| 19 | +const vue3ElementAdmin: DefaultTheme.NavItemWithLink[] = [ |
| 20 | + { text: '概述', link: '/vue3-element-admin/' }, |
| 21 | +] |
| 22 | + |
| 23 | +const vue3AntdvMobile: DefaultTheme.NavItemWithLink[] = [ |
| 24 | + { text: '概述', link: '/vue3-antdv-admin/' }, |
| 25 | +] |
| 26 | + |
| 27 | +const Nav: DefaultTheme.NavItem[] = [ |
| 28 | + { |
| 29 | + text: '快速开始', |
| 30 | + items: [ |
| 31 | + { |
| 32 | + text: '指南', |
| 33 | + items: Guides, |
| 34 | + }, |
| 35 | + ], |
| 36 | + activeMatch: '^/guide/', |
| 37 | + }, |
| 38 | + |
| 39 | + { |
| 40 | + text: '移动模板', |
| 41 | + items: [ |
| 42 | + { |
| 43 | + text: 'vue3-vant-mobile', |
| 44 | + link: '/vue3-vant-mobile/', |
| 45 | + }, |
| 46 | + { |
| 47 | + text: 'vue3-varlet-mobile', |
| 48 | + link: '/vue3-varlet-mobile/', |
| 49 | + }, |
| 50 | + { |
| 51 | + text: 'nuxt3-vant-mobile', |
| 52 | + link: '/nuxt3-vant-mobile/', |
| 53 | + }, |
| 54 | + ] |
| 55 | + }, |
| 56 | + { |
| 57 | + text: '中后台模版', |
| 58 | + items: [ |
| 59 | + { |
| 60 | + text: 'vue3-antdv-admin', |
| 61 | + link: '/vue3-antdv-admin/', |
| 62 | + }, |
| 63 | + { |
| 64 | + text: 'vue3-element-admin', |
| 65 | + link: '/vue3-element-admin/', |
| 66 | + } |
| 67 | + ] |
| 68 | + }, |
| 69 | +] |
| 70 | + |
| 71 | +const SidebarGuide: DefaultTheme.SidebarItem[] = [ |
| 72 | + { |
| 73 | + text: '指南', |
| 74 | + items: Guides, |
| 75 | + }, |
| 76 | + { |
| 77 | + text: '移动模板', |
| 78 | + items: [ |
| 79 | + { |
| 80 | + text: 'vue3-vant-mobile', |
| 81 | + link: '/vue3-vant-mobile/', |
| 82 | + }, |
| 83 | + { |
| 84 | + text: 'vue3-varlet-mobile', |
| 85 | + link: '/vue3-varlet-mobile/', |
| 86 | + }, |
| 87 | + { |
| 88 | + text: 'nuxt3-vant-mobile', |
| 89 | + link: '/nuxt3-vant-mobile/', |
| 90 | + }, |
| 91 | + ], |
| 92 | + }, |
| 93 | + { |
| 94 | + text: '中后台模板', |
| 95 | + items: [ |
| 96 | + { |
| 97 | + text: 'vue3-antdv-admin', |
| 98 | + link: '/vue3-antdv-admin/', |
| 99 | + }, |
| 100 | + { |
| 101 | + text: 'vue3-element-admin', |
| 102 | + link: '/vue3-element-admin/', |
| 103 | + }, |
| 104 | + ], |
| 105 | + } |
| 106 | +] |
| 107 | + |
| 108 | +const vue3VantMobileSidebarConfig: DefaultTheme.SidebarItem[] = [ |
| 109 | + { |
| 110 | + text: 'vue3-vant-mobile', |
| 111 | + collapsed: false, |
| 112 | + items: vue3VantMobile, |
| 113 | + }, |
| 114 | +] |
| 115 | + |
| 116 | +const vue3VarletMobileSidebarConfig: DefaultTheme.SidebarItem[] = [ |
| 117 | + { |
| 118 | + text: 'vue3-varlet-mobile', |
| 119 | + collapsed: false, |
| 120 | + items: vue3VarletMobile, |
| 121 | + }, |
| 122 | +] |
| 123 | + |
| 124 | +const nuxt3VantMobileSidebarConfig: DefaultTheme.SidebarItem[] = [ |
| 125 | + { |
| 126 | + text: 'nuxt3-vant-mobile', |
| 127 | + collapsed: false, |
| 128 | + items: nuxt3VantMobile, |
| 129 | + }, |
| 130 | +] |
| 131 | + |
| 132 | +const vue3AntdvMobileSidebarConfig: DefaultTheme.SidebarItem[] = [ |
| 133 | + { |
| 134 | + text: 'vue3-antdv-admin', |
| 135 | + collapsed: false, |
| 136 | + items: vue3AntdvMobile, |
| 137 | + }, |
| 138 | +] |
| 139 | + |
| 140 | +const vue3ElementAdminSidebarConfig: DefaultTheme.SidebarItem[] = [ |
| 141 | + { |
| 142 | + text: 'vue3-element-admin', |
| 143 | + collapsed: false, |
| 144 | + items: vue3ElementAdmin, |
| 145 | + }, |
| 146 | +] |
| 147 | + |
| 148 | + |
| 149 | +export default defineConfig({ |
| 150 | + title: 'EasyTemplate', |
| 151 | + |
| 152 | + lastUpdated: true, |
| 153 | + cleanUrls: true, |
| 154 | + metaChunk: true, |
| 155 | + |
| 156 | + head: [ |
| 157 | + ['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }], |
| 158 | + ['link', { rel: 'icon', type: 'image/png', href: '/logo.png' }], |
| 159 | + ['meta', { name: 'theme-color', content: '#55a578' }], |
| 160 | + ['meta', { property: 'og:type', content: 'website' }], |
| 161 | + ['meta', { property: 'og:locale', content: 'zh' }], |
| 162 | + ['meta', { property: 'og:title', content: 'EasyTemplate | Out of the box Vue 3 template' }], |
| 163 | + ['meta', { property: 'og:site_name', content: 'EasyTemplate' }], |
| 164 | + // ['meta', { property: 'og:url', content: '' }], |
| 165 | + ], |
| 166 | + |
| 167 | + themeConfig: { |
| 168 | + logo: { src: '/logo.svg', width: 24, height: 24 }, |
| 169 | + |
| 170 | + search: { |
| 171 | + provider: 'local', |
| 172 | + }, |
| 173 | + |
| 174 | + socialLinks: [ |
| 175 | + { icon: 'github', link: 'https://github.com/easy-temps' } |
| 176 | + ], |
| 177 | + |
| 178 | + nav: Nav, |
| 179 | + |
| 180 | + sidebar: { |
| 181 | + '/guide/': SidebarGuide, |
| 182 | + '/vue3-vant-mobile/': vue3VantMobileSidebarConfig, |
| 183 | + '/vue3-varlet-mobile/': vue3VarletMobileSidebarConfig, |
| 184 | + '/nuxt3-vant-mobile/': nuxt3VantMobileSidebarConfig, |
| 185 | + '/vue3-antdv-admin/': vue3AntdvMobileSidebarConfig, |
| 186 | + '/vue3-element-admin/': vue3ElementAdminSidebarConfig, |
| 187 | + }, |
| 188 | + |
| 189 | + editLink: { |
| 190 | + pattern: 'https://github.com/easy-temps/easy-docs/edit/main/:path', |
| 191 | + text: '在 GitHub 上编辑此页面', |
| 192 | + }, |
| 193 | + |
| 194 | + footer: { |
| 195 | + message: '基于 MIT 许可发布', |
| 196 | + copyright: '版权所有 © 2022-2024 EasyTemplate', |
| 197 | + }, |
| 198 | + } |
| 199 | +}) |
0 commit comments