|
1 | | -import { defineConfig } from 'vitepress' |
| 1 | +import { defineConfig } from "vitepress"; |
| 2 | +import { withPwa } from "@vite-pwa/vitepress"; |
2 | 3 |
|
3 | 4 | // https://vitepress.dev/reference/site-config |
4 | | -export default defineConfig({ |
5 | | - title: "GCOP", |
6 | | - description: "🚀 GCOP is an intelligent assistant designed to enhance your Git workflow by automating commit message generation using AI. Help you write better git commit message.", |
7 | | - sitemap: { |
8 | | - hostname: "https://gcop.zeeland.top", |
9 | | - transformItems: (items) => { |
10 | | - return items.map(item => ({ |
11 | | - ...item, |
12 | | - changefreq: 'weekly', |
13 | | - priority: 0.8, |
14 | | - })) |
15 | | - } |
16 | | - }, |
17 | | - head: [ |
18 | | - ['link', { rel: 'icon', href: '/gcop-logo.ico' }], |
19 | | - [ |
20 | | - 'script', |
21 | | - { |
22 | | - defer: 'true', |
23 | | - 'data-website-id': '77d0dd59-9095-463b-a317-b49b373af92d', |
24 | | - src: 'https://umami.zeeland.top/script.js' |
25 | | - } |
26 | | - ], |
27 | | - ['meta', { property: 'description', content: 'GCOP is an intelligent assistant designed to enhance your Git workflow by automating commit message generation using AI. Help you write better git commit message.' }], |
28 | | - ['meta', { property: 'keywords', content: 'gcop, git, git copilot, LLM, git commit, commit message, conventional commit, version control,auto commit, git commit 规范' }], |
29 | | - ['meta', { property: 'og:site_name', content: 'GCOP - Your Git AI Copilot' }], |
30 | | - ['meta', { property: 'og:url', content: 'https://gcop.zeeland.top' }], |
31 | | - ['meta', { property: 'og:title', content: 'GCOP - Your Git AI Copilot' }], |
32 | | - ['meta', { property: 'og:description', content: 'GCOP is an intelligent assistant designed to enhance your Git workflow by automating commit message generation using AI. Help you write better git commit message.' }], |
33 | | - ['meta', { property: 'og:image', content: 'https://r2.zeeland.top/images/2024/10/b03949e6bc43d71b7ddab3d70515eee0.png' }], |
34 | | - ['meta', { property: 'twitter:card', content: 'summary_large_image' }], |
35 | | - ['meta', { property: 'twitter:image', content: 'https://r2.zeeland.top/images/2024/10/b03949e6bc43d71b7ddab3d70515eee0.png' }], |
36 | | - ['meta', { property: 'twitter:title', content: 'GCOP - Your Git AI Copilot' }], |
37 | | - ['meta', { property: 'twitter:description', content: 'GCOP is an intelligent assistant designed to enhance your Git workflow by automating commit message generation using AI. Help you write better git commit message.' }], |
38 | | - ['meta', { name: 'baidu-site-verification', content: 'codeva-Z87P16KxE3' }], |
39 | | - [ |
40 | | - "script", |
41 | | - { |
42 | | - async: "true", |
43 | | - src: "https://www.googletagmanager.com/gtag/js?id=G-T0VJ22HP63", |
| 5 | +export default withPwa( |
| 6 | + defineConfig({ |
| 7 | + title: "GCOP", |
| 8 | + description: |
| 9 | + "🚀 GCOP is an intelligent assistant designed to enhance your Git workflow by automating commit message generation using AI. Help you write better git commit message.", |
| 10 | + sitemap: { |
| 11 | + hostname: "https://gcop.zeeland.top", |
| 12 | + transformItems: (items) => { |
| 13 | + return items.map((item) => ({ |
| 14 | + ...item, |
| 15 | + changefreq: "weekly", |
| 16 | + priority: 0.8, |
| 17 | + })); |
44 | 18 | }, |
45 | | - ], |
46 | | - [ |
47 | | - "script", |
48 | | - {}, |
49 | | - `window.dataLayer = window.dataLayer || []; |
| 19 | + }, |
| 20 | + head: [ |
| 21 | + ["link", { rel: "icon", href: "/gcop-logo.ico" }], |
| 22 | + [ |
| 23 | + "script", |
| 24 | + { |
| 25 | + defer: "true", |
| 26 | + "data-website-id": "77d0dd59-9095-463b-a317-b49b373af92d", |
| 27 | + src: "https://umami.zeeland.top/script.js", |
| 28 | + }, |
| 29 | + ], |
| 30 | + [ |
| 31 | + "meta", |
| 32 | + { |
| 33 | + property: "description", |
| 34 | + content: |
| 35 | + "GCOP is an intelligent assistant designed to enhance your Git workflow by automating commit message generation using AI. Help you write better git commit message.", |
| 36 | + }, |
| 37 | + ], |
| 38 | + [ |
| 39 | + "meta", |
| 40 | + { |
| 41 | + property: "keywords", |
| 42 | + content: |
| 43 | + "gcop, git, git copilot, LLM, git commit, commit message, conventional commit, version control,auto commit, git commit 规范", |
| 44 | + }, |
| 45 | + ], |
| 46 | + [ |
| 47 | + "meta", |
| 48 | + { property: "og:site_name", content: "GCOP - Your Git AI Copilot" }, |
| 49 | + ], |
| 50 | + ["meta", { property: "og:url", content: "https://gcop.zeeland.top" }], |
| 51 | + ["meta", { property: "og:title", content: "GCOP - Your Git AI Copilot" }], |
| 52 | + [ |
| 53 | + "meta", |
| 54 | + { |
| 55 | + property: "og:description", |
| 56 | + content: |
| 57 | + "GCOP is an intelligent assistant designed to enhance your Git workflow by automating commit message generation using AI. Help you write better git commit message.", |
| 58 | + }, |
| 59 | + ], |
| 60 | + [ |
| 61 | + "meta", |
| 62 | + { |
| 63 | + property: "og:image", |
| 64 | + content: |
| 65 | + "https://r2.zeeland.top/images/2024/10/b03949e6bc43d71b7ddab3d70515eee0.png", |
| 66 | + }, |
| 67 | + ], |
| 68 | + ["meta", { property: "twitter:card", content: "summary_large_image" }], |
| 69 | + [ |
| 70 | + "meta", |
| 71 | + { |
| 72 | + property: "twitter:image", |
| 73 | + content: |
| 74 | + "https://r2.zeeland.top/images/2024/10/b03949e6bc43d71b7ddab3d70515eee0.png", |
| 75 | + }, |
| 76 | + ], |
| 77 | + [ |
| 78 | + "meta", |
| 79 | + { property: "twitter:title", content: "GCOP - Your Git AI Copilot" }, |
| 80 | + ], |
| 81 | + [ |
| 82 | + "meta", |
| 83 | + { |
| 84 | + property: "twitter:description", |
| 85 | + content: |
| 86 | + "GCOP is an intelligent assistant designed to enhance your Git workflow by automating commit message generation using AI. Help you write better git commit message.", |
| 87 | + }, |
| 88 | + ], |
| 89 | + [ |
| 90 | + "meta", |
| 91 | + { name: "baidu-site-verification", content: "codeva-Z87P16KxE3" }, |
| 92 | + ], |
| 93 | + [ |
| 94 | + "script", |
| 95 | + { |
| 96 | + async: "true", |
| 97 | + src: "https://www.googletagmanager.com/gtag/js?id=G-T0VJ22HP63", |
| 98 | + }, |
| 99 | + ], |
| 100 | + [ |
| 101 | + "script", |
| 102 | + {}, |
| 103 | + `window.dataLayer = window.dataLayer || []; |
50 | 104 | function gtag(){dataLayer.push(arguments);} |
51 | 105 | gtag('js', new Date()); |
52 | 106 | gtag('config', 'G-T0VJ22HP63');`, |
| 107 | + ], |
53 | 108 | ], |
54 | | - ], |
55 | | - themeConfig: { |
56 | | - // https://vitepress.dev/reference/default-theme-config |
57 | | - logo: '/gcop-logo.png', |
58 | | - nav: [ |
59 | | - { text: 'Home', link: '/' }, |
60 | | - { text: 'Guide', link: '/guide/introduction' }, |
61 | | - { text: 'Commands', link: '/guide/commands' }, |
62 | | - { text: 'FAQ', link: '/faq' }, |
63 | | - ], |
64 | | - sidebar: [ |
65 | | - { |
66 | | - text: 'Guide', |
67 | | - items: [ |
68 | | - { text: 'Introduction', link: '/guide/introduction' }, |
69 | | - { text: 'Quick Start', link: '/guide/quick-start' }, |
70 | | - { text: 'Commands', link: '/guide/commands' }, |
71 | | - { text: 'Configuration', link: '/guide/configuration' }, |
72 | | - { text: 'Connect to Gaianet', link: '/guide/connect2gaianet' }, |
73 | | - ] |
| 109 | + themeConfig: { |
| 110 | + // https://vitepress.dev/reference/default-theme-config |
| 111 | + logo: "/gcop-logo.png", |
| 112 | + outline: { |
| 113 | + level: [2, 3], |
| 114 | + }, |
| 115 | + nav: [ |
| 116 | + { text: "Home", link: "/" }, |
| 117 | + { text: "Guide", link: "/guide/introduction" }, |
| 118 | + { text: "Commands", link: "/guide/commands" }, |
| 119 | + { text: "FAQ", link: "/faq" }, |
| 120 | + ], |
| 121 | + sidebar: [ |
| 122 | + { |
| 123 | + text: "Guide", |
| 124 | + items: [ |
| 125 | + { text: "Introduction", link: "/guide/introduction" }, |
| 126 | + { text: "Quick Start", link: "/guide/quick-start" }, |
| 127 | + { text: "How to guide", link: "/guide/how-to-guide" }, |
| 128 | + { text: "Commands", link: "/guide/commands" }, |
| 129 | + { text: "Configuration", link: "/guide/configuration" }, |
| 130 | + { text: "Upgrade", link: "/guide/upgrade" }, |
| 131 | + ], |
| 132 | + }, |
| 133 | + { |
| 134 | + text: "Other", |
| 135 | + items: [ |
| 136 | + { text: "How to Config Model", link: "/other/how-to-config-model" }, |
| 137 | + { text: "Connect to Gaianet", link: "/other/connect2gaianet" }, |
| 138 | + { text: "Changelog", link: "/other/changelog" }, |
| 139 | + { text: "Contributing", link: "/other/contributing" }, |
| 140 | + ], |
| 141 | + }, |
| 142 | + ], |
| 143 | + socialLinks: [ |
| 144 | + { icon: "github", link: "https://github.com/undertone0809/gcop" }, |
| 145 | + { icon: "twitter", link: "https://x.com/kfhedRk3lXofRIB" }, |
| 146 | + ], |
| 147 | + footer: { |
| 148 | + message: "Released under the MIT License.", |
| 149 | + copyright: "Copyright © 2023-present Zeeland", |
| 150 | + }, |
| 151 | + search: { |
| 152 | + provider: "local", |
| 153 | + }, |
| 154 | + // Add an edit link for each page |
| 155 | + editLink: { |
| 156 | + pattern: "https://github.com/undertone0809/gcop/edit/main/docs/:path", |
| 157 | + text: "Edit this page on GitHub", |
74 | 158 | }, |
75 | | - { |
76 | | - text: 'Reference', |
77 | | - items: [ |
78 | | - { text: 'How to Config Model', link: '/how-to-config-model' }, |
79 | | - { text: 'FAQ', link: '/faq' }, |
80 | | - { text: 'Changelog', link: '/changelog' }, |
81 | | - { text: 'Contributing', link: '/contributing' }, |
82 | | - ] |
83 | | - } |
84 | | - ], |
85 | | - socialLinks: [ |
86 | | - { icon: 'github', link: 'https://github.com/undertone0809/gcop' }, |
87 | | - { icon: 'twitter', link: 'https://x.com/kfhedRk3lXofRIB' } |
88 | | - ], |
89 | | - footer: { |
90 | | - message: 'Released under the MIT License.', |
91 | | - copyright: 'Copyright © 2023-present Zeeland' |
92 | | - }, |
93 | | - search: { |
94 | | - provider: 'local' |
95 | 159 | }, |
96 | | - // Add an edit link for each page |
97 | | - editLink: { |
98 | | - pattern: 'https://github.com/undertone0809/gcop/edit/main/docs/:path', |
99 | | - text: 'Edit this page on GitHub' |
| 160 | + pwa: { |
| 161 | + manifest: { |
| 162 | + name: "GCOP", |
| 163 | + short_name: "gcop", |
| 164 | + theme_color: "#2b2a27", |
| 165 | + background_color: "#ffffff", |
| 166 | + display: "standalone", |
| 167 | + orientation: "portrait", |
| 168 | + scope: "/", |
| 169 | + start_url: "/", |
| 170 | + icons: [ |
| 171 | + { |
| 172 | + src: "/gcop-logo.png", |
| 173 | + sizes: "192x192", |
| 174 | + type: "image/png", |
| 175 | + purpose: "maskable any", |
| 176 | + }, |
| 177 | + ], |
| 178 | + }, |
100 | 179 | }, |
101 | | - } |
102 | | -}) |
| 180 | + }) |
| 181 | +); |
0 commit comments