|
| 1 | +import { defineConfig } from 'vitepress' |
| 2 | +const docsVersion = "VERSION"; |
| 3 | +const base = process.env.NODE_ENV === "development" ? '/chartjs-plugin-zoom/master/' : `/chartjs-plugin-zoom/${docsVersion}/`; |
| 4 | + |
| 5 | +// https://vitepress.dev/reference/site-config |
| 6 | +export default defineConfig({ |
| 7 | + title: "chartjs-plugin-zoom", |
| 8 | + description: "A zoom and pan plugin for Chart.js >= 3.0.0", |
| 9 | + head: [ |
| 10 | + ['link', { rel: 'icon', href: '/favicon.ico' }], |
| 11 | + ], |
| 12 | + base, |
| 13 | + outDir: '../../dist/docs', |
| 14 | + themeConfig: { |
| 15 | + // https://vitepress.dev/reference/default-theme-config |
| 16 | + logo: '/hero.svg', |
| 17 | + footer: { |
| 18 | + message: 'Released under the MIT License', |
| 19 | + copyright: 'Copyright © 2016-2024 chartjs-plugin-zoom contributors', |
| 20 | + }, |
| 21 | + nav: [ |
| 22 | + { |
| 23 | + text: docsVersion, |
| 24 | + items: [ |
| 25 | + { text: 'Development (master)', link: '/chartjs-plugin-zoom/master/' }, |
| 26 | + { text: '2.x.x', link: '/chartjs-plugin-zoom/2.0.1/' }, |
| 27 | + { text: '1.x.x', link: '/chartjs-plugin-zoom/1.3.0/' }, |
| 28 | + ], |
| 29 | + }, |
| 30 | + { text: 'Home', link: '/' }, |
| 31 | + { text: 'Guide', link: '/guide/integration' }, |
| 32 | + { text: 'Reference', link: '/api/README' }, |
| 33 | + { text: 'Samples', link: `/samples/` }, |
| 34 | + { |
| 35 | + text: 'Ecosystem', |
| 36 | + ariaLabel: 'Community Menu', |
| 37 | + items: [ |
| 38 | + { text: 'Awesome', link: 'https://github.com/chartjs/awesome' }, |
| 39 | + ] |
| 40 | + }, |
| 41 | + { text: 'GitHub', link: 'https://github.com/chartjs/chartjs-plugin-zoom' }, |
| 42 | + ], |
| 43 | + |
| 44 | + sidebar: [ |
| 45 | + { |
| 46 | + text: 'Guide', |
| 47 | + collapsed: false, |
| 48 | + link: '/guide/integration', |
| 49 | + items: [ |
| 50 | + { text: 'Integration', link: '/guide/integration' }, |
| 51 | + { text: 'Usage', link: '/guide/usage' }, |
| 52 | + { text: 'Options', link: '/guide/options' }, |
| 53 | + { text: 'Animations', link: '/guide/animations' }, |
| 54 | + { text: 'Developers', link: '/guide/developers' }, |
| 55 | + ], |
| 56 | + }, |
| 57 | + { |
| 58 | + text: 'Samples', |
| 59 | + collapsed: false, |
| 60 | + link: '/samples/basic', |
| 61 | + items: [ |
| 62 | + { text: 'Basic', link: '/samples/basic' }, |
| 63 | + { |
| 64 | + text: 'Wheel Zoom', |
| 65 | + collapsed: true, |
| 66 | + items: [ |
| 67 | + { text: 'Category Scale', link: '/samples/wheel/category' }, |
| 68 | + { text: 'Logarithmic Scale', link: '/samples/wheel/log' }, |
| 69 | + { text: 'Time Scale', link: '/samples/wheel/time' }, |
| 70 | + { text: 'Over Scale Mode', link: '/samples/wheel/over-scale-mode' }, |
| 71 | + { text: 'Click to Zoom', link: '/samples/wheel/click-zoom' }, |
| 72 | + ], |
| 73 | + }, |
| 74 | + { |
| 75 | + text: 'Drag to Zoom', |
| 76 | + collapsed: true, |
| 77 | + items: [ |
| 78 | + { text: 'Category Scale', link: '/samples/drag/category' }, |
| 79 | + { text: 'Linear Scale', link: '/samples/drag/linear' }, |
| 80 | + { text: 'Logarithmic Scale', link: '/samples/drag/log' }, |
| 81 | + { text: 'Time Scale', link: '/samples/drag/time' }, |
| 82 | + { text: 'Timeseries Scale', link: '/samples/drag/timeseries' }, |
| 83 | + ], |
| 84 | + }, |
| 85 | + { text: 'API', link: '/samples/api' }, |
| 86 | + { text: 'Fetch Data', link: '/samples/fetch-data' }, |
| 87 | + { text: 'Pan Region', link: '/samples/pan-region' }, |
| 88 | + ] |
| 89 | + }, |
| 90 | + { |
| 91 | + text: 'API Reference', |
| 92 | + link: '/api/README', |
| 93 | + } |
| 94 | + ], |
| 95 | + |
| 96 | + socialLinks: [ |
| 97 | + { icon: 'github', link: 'https://github.com/chartjs/chartjs-plugin-zoom' }, |
| 98 | + ] |
| 99 | + } |
| 100 | +}) |
0 commit comments