|
1 | 1 | import { defineConfig } from 'vitepress'
|
2 |
| -import { description, discord, font, github, name, releases, twitter,} from './meta' |
3 | 2 | import { version } from '../../package.json'
|
| 3 | +import { description, discord, font, github, name, releases, twitter } from './meta' |
4 | 4 |
|
5 | 5 | export default defineConfig({
|
6 |
| - lang: 'en-US', |
7 |
| - title: name, |
8 |
| - description, |
9 |
| - head: [ |
10 |
| - ['meta', { name: 'theme-color', content: '#ffffff' }], |
11 |
| - ['link', { rel: 'icon', href: '/logo.svg', type: 'image/svg+xml' }], |
12 |
| - ['meta', { property: 'og:title', content: name }], |
13 |
| - ['meta', { property: 'og:description', content: description }], |
14 |
| - ['meta', { name: 'twitter:title', content: name }], |
15 |
| - ['meta', { name: 'twitter:description', content: description }], |
16 |
| - ['meta', { name: 'twitter:card', content: 'summary_large_image' }], |
17 |
| - ['link', { href: font, rel: 'stylesheet' }], |
18 |
| - ['link', { rel: 'mask-icon', href: '/logo.svg', color: '#ffffff' }], |
| 6 | + lang: 'en-US', |
| 7 | + title: name, |
| 8 | + description, |
| 9 | + head: [ |
| 10 | + ['meta', { name: 'theme-color', content: '#ffffff' }], |
| 11 | + ['link', { rel: 'icon', href: '/logo.svg', type: 'image/svg+xml' }], |
| 12 | + ['meta', { property: 'og:title', content: name }], |
| 13 | + ['meta', { property: 'og:description', content: description }], |
| 14 | + ['meta', { name: 'twitter:title', content: name }], |
| 15 | + ['meta', { name: 'twitter:description', content: description }], |
| 16 | + ['meta', { name: 'twitter:card', content: 'summary_large_image' }], |
| 17 | + ['link', { href: font, rel: 'stylesheet' }], |
| 18 | + ['link', { rel: 'mask-icon', href: '/logo.svg', color: '#ffffff' }], |
| 19 | + ], |
| 20 | + lastUpdated: true, |
| 21 | + markdown: { |
| 22 | + theme: { |
| 23 | + light: 'vitesse-light', |
| 24 | + dark: 'vitesse-dark', |
| 25 | + }, |
| 26 | + }, |
| 27 | + themeConfig: { |
| 28 | + logo: '/logo.svg', |
| 29 | + editLink: { |
| 30 | + pattern: 'https://github.com/elonehoo/vue-hooks-form/tree/main/docs/:path', |
| 31 | + text: 'Suggest changes to this page', |
| 32 | + }, |
| 33 | + socialLinks: [ |
| 34 | + { icon: 'twitter', link: twitter }, |
| 35 | + { icon: 'discord', link: discord }, |
| 36 | + { icon: 'github', link: github }, |
19 | 37 | ],
|
20 |
| - lastUpdated: true, |
21 |
| - markdown: { |
22 |
| - theme: { |
23 |
| - light: 'vitesse-light', |
24 |
| - dark: 'vitesse-dark', |
25 |
| - }, |
| 38 | + footer: { |
| 39 | + message: 'Released under the MIT License.', |
| 40 | + copyright: 'Copyright © 2023-PRESENT Elone Hoo', |
26 | 41 | },
|
27 |
| - themeConfig: { |
28 |
| - logo: '/logo.svg', |
29 |
| - editLink: { |
30 |
| - pattern: 'https://github.com/elonehoo/vue-hooks-form/tree/main/docs/:path', |
31 |
| - text: 'Suggest changes to this page', |
| 42 | + nav: [ |
| 43 | + { text: 'Guide', link: '/guide/' }, |
| 44 | + { text: 'Functions', items: [ |
| 45 | + { |
| 46 | + text: '', |
| 47 | + items: [ |
| 48 | + { text: 'useForm', link: '/use-form/' }, |
| 49 | + ], |
32 | 50 | },
|
33 |
| - socialLinks: [ |
34 |
| - { icon: 'twitter', link: twitter }, |
35 |
| - { icon: 'discord', link: discord }, |
36 |
| - { icon: 'github', link: github }, |
| 51 | + ] }, |
| 52 | + { |
| 53 | + text: `v${version}`, |
| 54 | + items: [ |
| 55 | + { |
| 56 | + text: 'Release Notes ', |
| 57 | + link: releases, |
| 58 | + }, |
37 | 59 | ],
|
38 |
| - footer: { |
39 |
| - message: 'Released under the MIT License.', |
40 |
| - copyright: 'Copyright © 2023-PRESENT Elone Hoo', |
| 60 | + }, |
| 61 | + ], |
| 62 | + sidebar: { |
| 63 | + '/': [ |
| 64 | + { |
| 65 | + text: 'Guide', |
| 66 | + items: [ |
| 67 | + { |
| 68 | + text: 'Getting Started', |
| 69 | + link: '/guide/', |
| 70 | + }, |
| 71 | + ], |
41 | 72 | },
|
42 |
| - nav: [ |
43 |
| - { text: 'Guide', link: '/guide/' }, |
44 |
| - { text: 'Functions', |
| 73 | + { |
| 74 | + text: 'Functions', |
| 75 | + items: [ |
| 76 | + { |
| 77 | + text: 'useForm', |
45 | 78 | items: [
|
46 |
| - { |
47 |
| - text: '', |
48 |
| - items: [ |
49 |
| - { text: 'useForm', link: '/use-form/' }, |
50 |
| - ], |
51 |
| - }, |
| 79 | + { text: 'useForm', link: '/use-form/' }, |
| 80 | + { text: 'register', link: '/use-form/register' }, |
| 81 | + { text: 'unregister', link: '/use-form/unregister' }, |
| 82 | + { text: 'formState', link: '/use-form/formState' }, |
| 83 | + { text: 'handleSubmit', link: '/use-form/handleSubmit' }, |
| 84 | + { text: 'reset', link: '/use-form/reset' }, |
| 85 | + { text: 'setError', link: '/use-form/setError' }, |
| 86 | + { text: 'clearErrors', link: '/use-form/clearErrors' }, |
| 87 | + { text: 'setValue', link: '/use-form/setValue' }, |
| 88 | + { text: 'setFocus', link: '/use-form/setFocus' }, |
| 89 | + { text: 'getValues', link: '/use-form/getValues' }, |
| 90 | + { text: 'getFieldState', link: '/use-form/getFieldState' }, |
| 91 | + { text: 'trigger', link: '/use-form/trigger' }, |
52 | 92 | ],
|
53 | 93 | },
|
54 |
| - { |
55 |
| - text: `v${version}`, |
56 |
| - items: [ |
57 |
| - { |
58 |
| - text: 'Release Notes ', |
59 |
| - link: releases, |
60 |
| - }, |
61 |
| - ], |
62 |
| - }, |
63 |
| - ], |
64 |
| - sidebar: { |
65 |
| - '/':[ |
66 |
| - { |
67 |
| - text:'Guide', |
68 |
| - items:[ |
69 |
| - { |
70 |
| - text:'Getting Started', |
71 |
| - link:'/guide/' |
72 |
| - } |
73 |
| - ] |
74 |
| - }, |
75 |
| - { |
76 |
| - text:'Functions', |
77 |
| - items:[ |
78 |
| - { |
79 |
| - text:'useForm', |
80 |
| - items:[ |
81 |
| - {text:'useForm',link:'/use-form/'}, |
82 |
| - {text:'register',link:'/use-form/register'}, |
83 |
| - {text:'unregister',link:'/use-form/unregister'}, |
84 |
| - {text:'formState',link:'/use-form/formState'}, |
85 |
| - {text:'handleSubmit',link:'/use-form/handleSubmit'}, |
86 |
| - {text:'reset',link:'/use-form/reset'}, |
87 |
| - {text:'setError',link:'/use-form/setError'}, |
88 |
| - {text:'clearErrors',link:'/use-form/clearErrors'}, |
89 |
| - {text:'setValue',link:'/use-form/setValue'}, |
90 |
| - {text:'setFocus',link:'/use-form/setFocus'}, |
91 |
| - {text:'getValues',link:'/use-form/getValues'}, |
92 |
| - {text:'getFieldState',link:'/use-form/getFieldState'}, |
93 |
| - {text:'trigger',link:'/use-form/trigger'}, |
94 |
| - ] |
95 |
| - }, |
96 |
| - ] |
97 |
| - } |
98 |
| - ] |
99 |
| - } |
| 94 | + ], |
| 95 | + }, |
| 96 | + ], |
100 | 97 | },
|
| 98 | + }, |
101 | 99 | })
|
0 commit comments