|
| 1 | +import { defineConfig } from 'vitepress'; |
| 2 | +import { componentPreview, containerPreview } from '@vitepress-demo-preview/plugin'; |
| 3 | + |
| 4 | +export default defineConfig({ |
| 5 | + base: '/vue-virtual-drag-list/', |
| 6 | + lang: 'en-US', |
| 7 | + title: 'vue-virtual-drag-list', |
| 8 | + description: 'A virtual scrolling list component that can be sorted by dragging', |
| 9 | + |
| 10 | + themeConfig: { |
| 11 | + search: { |
| 12 | + provider: 'local', |
| 13 | + }, |
| 14 | + |
| 15 | + socialLinks: [{ icon: 'github', link: 'https://github.com/mfuu/vue-virtual-drag-list' }], |
| 16 | + |
| 17 | + footer: { |
| 18 | + message: 'Released under the MIT License.', |
| 19 | + copyright: `Copyright © 2019-${new Date().getFullYear()} mfuu`, |
| 20 | + }, |
| 21 | + |
| 22 | + nav: [ |
| 23 | + { |
| 24 | + text: 'Guide', |
| 25 | + link: '/guide/install', |
| 26 | + activeMatch: '/guide/', |
| 27 | + }, |
| 28 | + { |
| 29 | + text: 'Demo', |
| 30 | + link: '/demo/basic', |
| 31 | + activeMatch: '/demo/', |
| 32 | + }, |
| 33 | + ], |
| 34 | + |
| 35 | + sidebar: { |
| 36 | + '/guide/': { |
| 37 | + base: '/guide/', |
| 38 | + items: [ |
| 39 | + { text: 'Getting Started', link: 'install' }, |
| 40 | + { text: 'Emits', link: 'emits' }, |
| 41 | + { text: 'Props', link: 'props' }, |
| 42 | + { text: 'Methods', link: 'methods' }, |
| 43 | + ], |
| 44 | + }, |
| 45 | + '/demo/': { |
| 46 | + base: '/demo/', |
| 47 | + items: [ |
| 48 | + { text: 'Basic', link: 'index' }, |
| 49 | + { text: 'Group', link: 'group' }, |
| 50 | + { text: 'Infinity', link: 'infinity' }, |
| 51 | + { text: 'Horizontal', link: 'horizontal' }, |
| 52 | + { text: 'Customize scroller', link: 'scroller' }, |
| 53 | + { text: 'Scroll To', link: 'scrollto' }, |
| 54 | + { text: 'Table Mode', link: 'table' }, |
| 55 | + ], |
| 56 | + }, |
| 57 | + }, |
| 58 | + }, |
| 59 | + markdown: { |
| 60 | + theme: { |
| 61 | + light: 'vitesse-light', |
| 62 | + dark: 'vitesse-dark', |
| 63 | + }, |
| 64 | + codeTransformers: [ |
| 65 | + { |
| 66 | + postprocess(code) { |
| 67 | + return code.replace(/\[!!code/g, '[!code'); |
| 68 | + }, |
| 69 | + }, |
| 70 | + ], |
| 71 | + config: (md) => { |
| 72 | + md.use(containerPreview); |
| 73 | + md.use(componentPreview); |
| 74 | + }, |
| 75 | + }, |
| 76 | +}); |
0 commit comments