|
| 1 | +import { defineConfig } from 'vitepress'; |
| 2 | +import { name, description, repository, license, author } from '../../package.json'; |
| 3 | +import typedocSidebar from '../api/typedoc-sidebar.json'; |
| 4 | + |
| 5 | +const cleanName = name.replace('@sgratzl/', ''); |
| 6 | + |
| 7 | +// https://vitepress.dev/reference/site-config |
| 8 | +export default defineConfig({ |
| 9 | + title: cleanName, |
| 10 | + description, |
| 11 | + base: `/${cleanName}/`, |
| 12 | + useWebFonts: false, |
| 13 | + themeConfig: { |
| 14 | + // https://vitepress.dev/reference/default-theme-config |
| 15 | + nav: [ |
| 16 | + { text: 'Home', link: '/' }, |
| 17 | + { text: 'Getting Started', link: '/getting-started' }, |
| 18 | + { text: 'Examples', link: '/examples/' }, |
| 19 | + { text: 'API', link: '/api/' }, |
| 20 | + { text: 'Related Plugins', link: '/related' }, |
| 21 | + ], |
| 22 | + |
| 23 | + sidebar: [ |
| 24 | + { |
| 25 | + text: 'Examples', |
| 26 | + items: [{ text: 'Basic', link: '/examples/' }], |
| 27 | + }, |
| 28 | + { |
| 29 | + text: 'API', |
| 30 | + collapsed: true, |
| 31 | + items: typedocSidebar, |
| 32 | + }, |
| 33 | + ], |
| 34 | + |
| 35 | + socialLinks: [{ icon: 'github', link: repository.url.replace('.git', '') }], |
| 36 | + |
| 37 | + footer: { |
| 38 | + message: `Released under the <a href="${repository.url.replace( |
| 39 | + '.git', |
| 40 | + '' |
| 41 | + )}/tree/main/LICENSE">${license} license</a>.`, |
| 42 | + copyright: `Copyright © 2019-present <a href="${author.url}">${author.name}</a>`, |
| 43 | + }, |
| 44 | + |
| 45 | + editLink: { |
| 46 | + pattern: `${repository.url.replace('.git', '')}/edit/main/docs/:path`, |
| 47 | + }, |
| 48 | + |
| 49 | + search: { |
| 50 | + provider: 'local', |
| 51 | + }, |
| 52 | + }, |
| 53 | +}); |
0 commit comments