|
| 1 | +import tabsPlugin from '@red-asuka/vitepress-plugin-tabs' |
| 2 | +import UnoCSS from 'unocss/vite' |
| 3 | +import { defineConfig } from 'vitepress' |
| 4 | +import llmstxt from 'vitepress-plugin-llms' |
| 5 | + |
| 6 | +export default defineConfig({ |
| 7 | + title: 'Fantastic-admin 官方文档 (v5)', |
| 8 | + description: '一款开箱即用的 Vue 中后台管理系统框架,采用 Vue3 + Vite 技术栈。', |
| 9 | + lang: 'zh-CN', |
| 10 | + base: '/', |
| 11 | + head: [ |
| 12 | + ['link', { rel: 'icon', href: '/favicon.svg' }], |
| 13 | + ['meta', { 'http-equiv': 'Expires', 'content': '0' }], |
| 14 | + ['meta', { 'http-equiv': 'Pragma', 'content': 'no-cache' }], |
| 15 | + ['meta', { 'http-equiv': 'Cache-control', 'content': 'no-cache' }], |
| 16 | + ['meta', { 'http-equiv': 'Cache', 'content': 'no-cache' }], |
| 17 | + ['meta', { name: 'keywords', content: 'fantastic-admin,后台系统,管理后台,后台模版,vue后台,vue-admin,vue-element-admin,vue-admin-template' }], |
| 18 | + ['keywords', { content: 'fantastic-admin,后台系统,管理后台,后台模版,vue后台,vue-admin,vue-element-admin,vue-admin-template' }], |
| 19 | + ['description', { content: '一款开箱即用的 Vue 中后台管理系统框架,采用 Vue3 + Vite 技术栈。' }], |
| 20 | + ], |
| 21 | + themeConfig: { |
| 22 | + logo: '/logo.svg', |
| 23 | + footer: { |
| 24 | + copyright: 'Copyright © 2020-present Fantastic-admin', |
| 25 | + }, |
| 26 | + nav: [ |
| 27 | + { |
| 28 | + text: '文档', |
| 29 | + items: [ |
| 30 | + { |
| 31 | + text: '指南', |
| 32 | + link: '/guide/intro', |
| 33 | + }, |
| 34 | + { |
| 35 | + text: '组件', |
| 36 | + link: '/components/index', |
| 37 | + }, |
| 38 | + ], |
| 39 | + }, |
| 40 | + ], |
| 41 | + socialLinks: [ |
| 42 | + { |
| 43 | + icon: { |
| 44 | + svg: '<svg t="1663266323098" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2880" width="200" height="200"><path d="M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m259.2-569.6H480c-12.8 0-25.6 12.8-25.6 25.6v64c0 12.8 12.8 25.6 25.6 25.6h176c12.8 0 25.6 12.8 25.6 25.6v12.8c0 41.6-35.2 76.8-76.8 76.8h-240c-12.8 0-25.6-12.8-25.6-25.6V416c0-41.6 35.2-76.8 76.8-76.8h355.2c12.8 0 25.6-12.8 25.6-25.6v-64c0-12.8-12.8-25.6-25.6-25.6H416c-105.6 0-188.8 86.4-188.8 188.8V768c0 12.8 12.8 25.6 25.6 25.6h374.4c92.8 0 169.6-76.8 169.6-169.6v-144c0-12.8-12.8-25.6-25.6-25.6z" p-id="2881"></path></svg>', |
| 45 | + }, |
| 46 | + link: 'https://gitee.com/fantastic-admin/basic', |
| 47 | + }, |
| 48 | + { |
| 49 | + icon: 'github', |
| 50 | + link: 'https://github.com/fantastic-admin/basic', |
| 51 | + }, |
| 52 | + ], |
| 53 | + sidebar: { |
| 54 | + '/guide/': [ |
| 55 | + { |
| 56 | + text: '指引', |
| 57 | + items: [ |
| 58 | + { text: '文档说明', link: '/guide/intro' }, |
| 59 | + { text: '更新日志', link: '/guide/changelog' }, |
| 60 | + ], |
| 61 | + collapsed: false, |
| 62 | + }, |
| 63 | + { |
| 64 | + text: '入门', |
| 65 | + items: [ |
| 66 | + { text: '准备工作', link: '/guide/ready' }, |
| 67 | + { text: '开始', link: '/guide/start' }, |
| 68 | + { text: '代码规范', link: '/guide/coding-standard' }, |
| 69 | + { text: '术语', link: '/guide/term' }, |
| 70 | + { text: '配置', link: '/guide/configure' }, |
| 71 | + { text: '开发者工具', link: '/guide/devtools' }, |
| 72 | + { text: '路由(导航)', link: '/guide/router' }, |
| 73 | + { text: '与服务端交互', link: '/guide/axios' }, |
| 74 | + { text: '全局状态管理', link: '/guide/store' }, |
| 75 | + { text: '资源', link: '/guide/resources' }, |
| 76 | + { text: '图标', link: '/guide/icon' }, |
| 77 | + { text: '构建与预览', link: '/guide/build' }, |
| 78 | + ], |
| 79 | + collapsed: false, |
| 80 | + }, |
| 81 | + { |
| 82 | + text: '进阶', |
| 83 | + items: [ |
| 84 | + { text: '登录相关', link: '/guide/login' }, |
| 85 | + { text: '权限', link: '/guide/permission' }, |
| 86 | + { text: '主页', link: '/guide/home' }, |
| 87 | + { text: '布局', link: '/guide/layout' }, |
| 88 | + { text: '主题', link: '/guide/theme' }, |
| 89 | + { text: '动态标题', link: '/guide/title' }, |
| 90 | + { text: '导航菜单', link: '/guide/menu' }, |
| 91 | + { text: '顶栏', link: '/guide/topbar', items: [ |
| 92 | + { text: '标签栏', link: '/guide/tabbar' }, |
| 93 | + { text: '工具栏', link: '/guide/toolbar' }, |
| 94 | + ] }, |
| 95 | + { text: '快捷键', link: '/guide/hotkeys' }, |
| 96 | + { text: '版权信息', link: '/guide/copyright' }, |
| 97 | + ], |
| 98 | + collapsed: false, |
| 99 | + }, |
| 100 | + { |
| 101 | + text: '高级', |
| 102 | + items: [ |
| 103 | + { text: '页面缓存', link: '/guide/keep-alive' }, |
| 104 | + { text: '国际化', link: '/guide/i18n' }, |
| 105 | + { text: '预留插槽', link: '/guide/slots' }, |
| 106 | + { text: 'RTL 模式', link: '/guide/rtl' }, |
| 107 | + { |
| 108 | + text: '代码文件自动生成', |
| 109 | + link: '/guide/plop', |
| 110 | + items: [ |
| 111 | + { text: '标准模块', link: '/guide/plop-module' }, |
| 112 | + ], |
| 113 | + }, |
| 114 | + { text: '常用 API', link: '/guide/api' }, |
| 115 | + { text: '私有 Storage 数据', link: '/guide/storage' }, |
| 116 | + { text: '首屏 Loading', link: '/guide/loading' }, |
| 117 | + { text: '页面水印', link: '/guide/watermark' }, |
| 118 | + { text: '反馈', link: '/guide/feedback' }, |
| 119 | + { text: '检查更新', link: '/guide/check-updates' }, |
| 120 | + { text: '错误日志', link: '/guide/error-log' }, |
| 121 | + { text: '自定义字体', link: '/guide/font' }, |
| 122 | + { text: '用户偏好设置', link: '/guide/preferences' }, |
| 123 | + { text: 'JSX', link: '/guide/jsx' }, |
| 124 | + { text: '基于文件系统的路由', link: '/guide/file-system-route' }, |
| 125 | + { text: '使用 Composition API 开发', link: '/guide/vue3-composition-api' }, |
| 126 | + { |
| 127 | + text: '替换 UI 组件库', |
| 128 | + items: [ |
| 129 | + { text: '替换为 Ant Design Vue', link: '/guide/replace-to-antd' }, |
| 130 | + { text: '替换为 Arco Design Vue', link: '/guide/replace-to-arco' }, |
| 131 | + { text: '替换为 Naive UI', link: '/guide/replace-to-naive' }, |
| 132 | + { text: '替换为 TDesign', link: '/guide/replace-to-tdesign' }, |
| 133 | + { text: '替换为 Vexip UI', link: '/guide/replace-to-vexip' }, |
| 134 | + { text: '替换为 iDux', link: '/guide/replace-to-idux' }, |
| 135 | + ], |
| 136 | + collapsed: true, |
| 137 | + }, |
| 138 | + ], |
| 139 | + collapsed: false, |
| 140 | + }, |
| 141 | + { |
| 142 | + text: '其它', |
| 143 | + items: [ |
| 144 | + { text: '框架更新', link: '/guide/upgrade' }, |
| 145 | + { text: '从 vue-element-admin 迁移', link: '/guide/vea-to-fa' }, |
| 146 | + { text: '常见问题', link: '/guide/q-a' }, |
| 147 | + ], |
| 148 | + collapsed: false, |
| 149 | + }, |
| 150 | + ], |
| 151 | + '/components/': [ |
| 152 | + { |
| 153 | + text: '组件', |
| 154 | + items: [ |
| 155 | + { text: '介绍', link: '/components/' }, |
| 156 | + ], |
| 157 | + }, |
| 158 | + { |
| 159 | + text: '内建组件', |
| 160 | + items: [ |
| 161 | + { text: 'FaAnimatedBeam 动画光束', link: '/components/fa-animated-beam' }, |
| 162 | + { text: 'FaAnimatedCountTo 动画计数', link: '/components/fa-animated-count-to' }, |
| 163 | + { text: 'FaAuth 鉴权', link: '/components/fa-auth' }, |
| 164 | + { text: 'FaAvatar 头像', link: '/components/fa-avatar' }, |
| 165 | + { text: 'FaBadge 徽章', link: '/components/fa-badge' }, |
| 166 | + { text: 'FaBlurReveal 模糊显示', link: '/components/fa-blur-reveal' }, |
| 167 | + { text: 'FaButton 按钮', link: '/components/fa-button' }, |
| 168 | + { text: 'FaCard 卡片', link: '/components/fa-card' }, |
| 169 | + { text: 'FaCarousel 轮播图', link: '/components/fa-carousel' }, |
| 170 | + { text: 'FaCheckbox 复选框', link: '/components/fa-checkbox' }, |
| 171 | + { text: 'FaCodePreview 代码预览', link: '/components/fa-code-preview' }, |
| 172 | + { text: 'FaCode 代码块', link: '/components/fa-code' }, |
| 173 | + { text: 'FaCollapsible 折叠面板', link: '/components/fa-collapsible' }, |
| 174 | + { text: 'FaCountTo 计数到', link: '/components/fa-count-to' }, |
| 175 | + { text: 'FaDigitalCard 数字卡片', link: '/components/fa-digital-card' }, |
| 176 | + { text: 'FaDivider 分割线', link: '/components/fa-divider' }, |
| 177 | + { text: 'FaDrawer 抽屉', link: '/components/fa-drawer' }, |
| 178 | + { text: 'FaDropdown 下拉菜单', link: '/components/fa-dropdown' }, |
| 179 | + { text: 'FaFileUpload 文件上传', link: '/components/fa-file-upload' }, |
| 180 | + { text: 'FaFixedActionBar 固定底部操作栏', link: '/components/fa-fixed-action-bar' }, |
| 181 | + { text: 'FaFlipCard 翻转卡片', link: '/components/fa-flip-card' }, |
| 182 | + { text: 'FaFlipWords 翻转文字', link: '/components/fa-flip-words' }, |
| 183 | + { text: 'FaGlowyCard 发光卡片', link: '/components/fa-glowy-card' }, |
| 184 | + { text: 'FaGradientButton 渐变按钮', link: '/components/fa-gradient-button' }, |
| 185 | + { text: 'FaHoverCard 悬浮卡片', link: '/components/fa-hover-card' }, |
| 186 | + { text: 'FaIcon 图标', link: '/components/fa-icon' }, |
| 187 | + { text: 'FaImagePreview 图片预览', link: '/components/fa-image-preview' }, |
| 188 | + { text: 'FaImageUpload 图片上传', link: '/components/fa-image-upload' }, |
| 189 | + { text: 'FaIconPicker 图标选择器', link: '/components/fa-icon-picker' }, |
| 190 | + { text: 'FaInput 输入框', link: '/components/fa-input' }, |
| 191 | + { text: 'FaInteractiveButton 交互式按钮', link: '/components/fa-interactive-button' }, |
| 192 | + { text: 'FaKbd 键盘', link: '/components/fa-kbd' }, |
| 193 | + { text: 'FaLayoutContainer 布局容器', link: '/components/fa-layout-container' }, |
| 194 | + { text: 'FaLinkPreview 链接预览', link: '/components/fa-link-preview' }, |
| 195 | + { text: 'FaLoading 加载遮罩', link: '/components/fa-loading' }, |
| 196 | + { text: 'FaMarquee 跑马灯', link: '/components/fa-marquee' }, |
| 197 | + { text: 'FaModal 弹窗', link: '/components/fa-modal' }, |
| 198 | + { text: 'FaPageHeader 页头', link: '/components/fa-page-header' }, |
| 199 | + { text: 'FaPageMain 内容块', link: '/components/fa-page-main' }, |
| 200 | + { text: 'FaPagination 分页', link: '/components/fa-pagination' }, |
| 201 | + { text: 'FaParticlesBg 粒子背景', link: '/components/fa-particles-bg' }, |
| 202 | + { text: 'FaPasswordStrength 密码强度', link: '/components/fa-password-strength' }, |
| 203 | + { text: 'FaPatternBg 图案背景', link: '/components/fa-pattern-bg' }, |
| 204 | + { text: 'FaPinInput 数字输入框', link: '/components/fa-pin-input' }, |
| 205 | + { text: 'FaPopover 浮动面板', link: '/components/fa-popover' }, |
| 206 | + { text: 'FaProgress 进度条', link: '/components/fa-progress' }, |
| 207 | + { text: 'FaScratchOff 刮刮乐', link: '/components/fa-scratch-off' }, |
| 208 | + { text: 'FaScrollArea 滚动区域', link: '/components/fa-scroll-area' }, |
| 209 | + { text: 'FaSearchBar 搜索面板', link: '/components/fa-search-bar' }, |
| 210 | + { text: 'FaSelect 选择器', link: '/components/fa-select' }, |
| 211 | + { text: 'FaSlider 滑块', link: '/components/fa-slider' }, |
| 212 | + { text: 'FaSmoothSwipe 平滑滑动', link: '/components/fa-smooth-swipe' }, |
| 213 | + { text: 'FaSparklesText 闪烁文字', link: '/components/fa-sparkles-text' }, |
| 214 | + { text: 'FaSparkline 迷你图', link: '/components/fa-sparkline' }, |
| 215 | + { text: 'FaSpotlightCard 聚光卡片', link: '/components/fa-spotlight-card' }, |
| 216 | + { text: 'FaStorageBox 储存箱', link: '/components/fa-storage-box' }, |
| 217 | + { text: 'FaSwitch 开关', link: '/components/fa-switch' }, |
| 218 | + { text: 'FaTabs 标签页', link: '/components/fa-tabs' }, |
| 219 | + { text: 'FaTextHighlight 文字高亮', link: '/components/fa-text-highlight' }, |
| 220 | + { text: 'FaTimeAgo 可阅读时间', link: '/components/fa-time-ago' }, |
| 221 | + { text: 'FaTimeline 时间线', link: '/components/fa-timeline' }, |
| 222 | + { text: 'FaTooltip 文字提示', link: '/components/fa-tooltip' }, |
| 223 | + { text: 'FaTree 树形控件', link: '/components/fa-tree' }, |
| 224 | + { text: 'FaToast 轻提示', link: '/components/fa-toast' }, |
| 225 | + { text: 'FaTrend 趋势标记', link: '/components/fa-trend' }, |
| 226 | + ], |
| 227 | + }, |
| 228 | + { |
| 229 | + text: '扩展组件', |
| 230 | + items: [ |
| 231 | + { text: 'ImageUpload 单图上传', link: '/components/image-upload' }, |
| 232 | + { text: 'ImagesUpload 多图上传', link: '/components/images-upload' }, |
| 233 | + { text: 'FileUpload 文件上传', link: '/components/file-upload' }, |
| 234 | + { text: 'ImagePreview 图片预览', link: '/components/image-preview' }, |
| 235 | + { text: 'PcasCascader 省市区街道联动', link: '/components/pcas-cascader' }, |
| 236 | + ], |
| 237 | + }, |
| 238 | + ], |
| 239 | + }, |
| 240 | + outline: 'deep', |
| 241 | + search: { |
| 242 | + provider: 'local', |
| 243 | + options: { |
| 244 | + translations: { |
| 245 | + button: { buttonText: '搜索文档', buttonAriaLabel: '搜索文档' }, |
| 246 | + modal: { |
| 247 | + noResultsText: '无法找到相关结果', |
| 248 | + resetButtonTitle: '清除查询条件', |
| 249 | + footer: { selectText: '选择', navigateText: '切换', closeText: '关闭' }, |
| 250 | + }, |
| 251 | + }, |
| 252 | + }, |
| 253 | + }, |
| 254 | + }, |
| 255 | + markdown: { |
| 256 | + config: (md) => { |
| 257 | + tabsPlugin(md) |
| 258 | + }, |
| 259 | + }, |
| 260 | + vite: { |
| 261 | + plugins: [ |
| 262 | + UnoCSS(), |
| 263 | + llmstxt(), |
| 264 | + ], |
| 265 | + }, |
| 266 | +}) |
0 commit comments