|
| 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: [ |
| 27 | + { text: 'Basic', link: '/examples/' }, |
| 28 | + { text: 'Dendrogram', link: '/examples/dendrogram' }, |
| 29 | + { text: 'Tree', link: '/examples/tree' }, |
| 30 | + { text: 'Force Directed Graph', link: '/examples/force' }, |
| 31 | + { text: 'Tree with Labels', link: '/examples/label' }, |
| 32 | + { text: 'Directed Tree', link: '/examples/directed' }, |
| 33 | + { text: 'Tree Orientations', link: '/examples/orientation' }, |
| 34 | + ], |
| 35 | + }, |
| 36 | + { |
| 37 | + text: 'API', |
| 38 | + collapsed: true, |
| 39 | + items: typedocSidebar, |
| 40 | + }, |
| 41 | + ], |
| 42 | + |
| 43 | + socialLinks: [{ icon: 'github', link: repository.url.replace('.git', '') }], |
| 44 | + |
| 45 | + footer: { |
| 46 | + message: `Released under the <a href="${repository.url.replace( |
| 47 | + '.git', |
| 48 | + '' |
| 49 | + )}/tree/main/LICENSE">${license} license</a>.`, |
| 50 | + copyright: `Copyright © 2019-present <a href="${author.url}">${author.name}</a>`, |
| 51 | + }, |
| 52 | + |
| 53 | + editLink: { |
| 54 | + pattern: `${repository.url.replace('.git', '')}/edit/main/docs/:path`, |
| 55 | + }, |
| 56 | + |
| 57 | + search: { |
| 58 | + provider: 'local', |
| 59 | + }, |
| 60 | + }, |
| 61 | +}); |
0 commit comments