|
| 1 | +import { defineConfig } from "vitepress"; |
| 2 | + |
| 3 | +const description = "gocron - Lightweight distributed scheduled task management system"; |
| 4 | + |
| 5 | +// https://vitepress.dev/reference/site-config |
| 6 | +export default defineConfig({ |
| 7 | + title: "gocron", |
| 8 | + description: description, |
| 9 | + cleanUrls: false, |
| 10 | + lastUpdated: true, |
| 11 | + ignoreDeadLinks: true, |
| 12 | + |
| 13 | + // 国际化配置 |
| 14 | + locales: { |
| 15 | + root: { |
| 16 | + label: 'English', |
| 17 | + lang: 'en-US', |
| 18 | + link: '/en/', |
| 19 | + themeConfig: { |
| 20 | + nav: [ |
| 21 | + { text: 'Home', link: '/en/' }, |
| 22 | + { text: 'Guide', link: '/en/guide/introduction' }, |
| 23 | + ], |
| 24 | + sidebar: { |
| 25 | + '/en/guide/': [ |
| 26 | + { |
| 27 | + text: 'Getting Started', |
| 28 | + items: [ |
| 29 | + { text: 'Introduction', link: '/en/guide/introduction' }, |
| 30 | + { text: 'Quick Start', link: '/en/guide/quick-start' }, |
| 31 | + { text: 'Configuration', link: '/en/guide/configuration' }, |
| 32 | + ] |
| 33 | + }, |
| 34 | + { |
| 35 | + text: 'Core Features', |
| 36 | + items: [ |
| 37 | + { text: 'Scheduled Tasks', link: '/en/guide/scheduled-tasks' }, |
| 38 | + { text: 'Agent Auto-Registration', link: '/en/guide/agent-registration' }, |
| 39 | + { text: 'Log Management', link: '/en/guide/log-management' }, |
| 40 | + { text: 'AI Features', link: '/en/guide/ai-features' }, |
| 41 | + { text: 'API Documentation', link: '/en/guide/api' }, |
| 42 | + ] |
| 43 | + }, |
| 44 | + { |
| 45 | + text: 'Deployment', |
| 46 | + items: [ |
| 47 | + { text: 'Kubernetes (Helm)', link: '/en/guide/kubernetes' }, |
| 48 | + { text: 'High Availability', link: '/en/guide/high-availability' }, |
| 49 | + ] |
| 50 | + }, |
| 51 | + { |
| 52 | + text: 'Security', |
| 53 | + items: [ |
| 54 | + { text: 'Two-Factor Authentication (2FA)', link: '/en/guide/security-2fa' }, |
| 55 | + { text: 'TLS Mutual Authentication', link: '/en/guide/security-tls' }, |
| 56 | + { text: 'Password Reset (CLI)', link: '/en/guide/password-reset' }, |
| 57 | + ] |
| 58 | + }, |
| 59 | + { |
| 60 | + text: 'About', |
| 61 | + items: [ |
| 62 | + { text: 'Contributing Guide', link: '/en/guide/contributing' }, |
| 63 | + { text: 'About Project', link: '/en/guide/about' }, |
| 64 | + ] |
| 65 | + } |
| 66 | + ] |
| 67 | + }, |
| 68 | + outline: { |
| 69 | + level: [2, 4], |
| 70 | + label: 'On this page', |
| 71 | + }, |
| 72 | + docFooter: { |
| 73 | + prev: 'Previous', |
| 74 | + next: 'Next', |
| 75 | + }, |
| 76 | + darkModeSwitchLabel: 'Theme', |
| 77 | + sidebarMenuLabel: 'Menu', |
| 78 | + returnToTopLabel: 'Return to top', |
| 79 | + lastUpdatedText: 'Last updated', |
| 80 | + editLink: { |
| 81 | + text: 'Edit this page on GitHub', |
| 82 | + pattern: 'https://github.com/gocronx-team/gocron/edit/master/docs/:path', |
| 83 | + }, |
| 84 | + } |
| 85 | + }, |
| 86 | + zh: { |
| 87 | + label: '简体中文', |
| 88 | + lang: 'zh-CN', |
| 89 | + link: '/zh/', |
| 90 | + themeConfig: { |
| 91 | + nav: [ |
| 92 | + { text: '首页', link: '/zh/' }, |
| 93 | + { text: '指南', link: '/zh/guide/introduction' }, |
| 94 | + ], |
| 95 | + sidebar: { |
| 96 | + '/zh/guide/': [ |
| 97 | + { |
| 98 | + text: '开始', |
| 99 | + items: [ |
| 100 | + { text: '简介', link: '/zh/guide/introduction' }, |
| 101 | + { text: '快速开始', link: '/zh/guide/quick-start' }, |
| 102 | + { text: '配置文件', link: '/zh/guide/configuration' }, |
| 103 | + ] |
| 104 | + }, |
| 105 | + { |
| 106 | + text: '核心功能', |
| 107 | + items: [ |
| 108 | + { text: '定时任务', link: '/zh/guide/scheduled-tasks' }, |
| 109 | + { text: 'Agent 自动注册', link: '/zh/guide/agent-registration' }, |
| 110 | + { text: '日志管理', link: '/zh/guide/log-management' }, |
| 111 | + { text: 'AI 功能', link: '/zh/guide/ai-features' }, |
| 112 | + { text: 'API 文档', link: '/zh/guide/api' }, |
| 113 | + ] |
| 114 | + }, |
| 115 | + { |
| 116 | + text: '部署', |
| 117 | + items: [ |
| 118 | + { text: 'Kubernetes (Helm)', link: '/zh/guide/kubernetes' }, |
| 119 | + { text: '高可用部署', link: '/zh/guide/high-availability' }, |
| 120 | + ] |
| 121 | + }, |
| 122 | + { |
| 123 | + text: '安全', |
| 124 | + items: [ |
| 125 | + { text: '双因素认证 (2FA)', link: '/zh/guide/security-2fa' }, |
| 126 | + { text: 'TLS 双向认证', link: '/zh/guide/security-tls' }, |
| 127 | + { text: '密码重置 (CLI)', link: '/zh/guide/password-reset' }, |
| 128 | + ] |
| 129 | + }, |
| 130 | + { |
| 131 | + text: '关于', |
| 132 | + items: [ |
| 133 | + { text: '贡献指南', link: '/zh/guide/contributing' }, |
| 134 | + { text: '关于项目', link: '/zh/guide/about' }, |
| 135 | + ] |
| 136 | + } |
| 137 | + ] |
| 138 | + }, |
| 139 | + outline: { |
| 140 | + level: [2, 4], |
| 141 | + label: '本页导航', |
| 142 | + }, |
| 143 | + docFooter: { |
| 144 | + prev: '上一页', |
| 145 | + next: '下一页', |
| 146 | + }, |
| 147 | + darkModeSwitchLabel: '主题', |
| 148 | + sidebarMenuLabel: '菜单', |
| 149 | + returnToTopLabel: '返回顶部', |
| 150 | + lastUpdatedText: '上次更新时间', |
| 151 | + editLink: { |
| 152 | + text: '在 GitHub 上编辑此页', |
| 153 | + pattern: 'https://github.com/gocronx-team/gocron/edit/master/docs/:path', |
| 154 | + }, |
| 155 | + } |
| 156 | + } |
| 157 | + }, |
| 158 | + |
| 159 | + head: [ |
| 160 | + ["link", { rel: "icon", type: "image/x-icon", href: "/favicon.ico" }], |
| 161 | + ["meta", { property: "og:type", content: "website" }], |
| 162 | + ["meta", { property: "og:title", content: "gocron | Distributed Scheduled Task System" }], |
| 163 | + ["meta", { property: "og:site_name", content: "gocron" }], |
| 164 | + ["meta", { property: "og:description", content: description }], |
| 165 | + ["meta", { name: "description", content: description }], |
| 166 | + ["meta", { name: "author", content: "gocron" }], |
| 167 | + ["meta", { name: "keywords", content: "gocron,定时任务,scheduled tasks,cron,distributed" }], |
| 168 | + ], |
| 169 | + |
| 170 | + markdown: { |
| 171 | + lineNumbers: true, |
| 172 | + image: { |
| 173 | + lazyLoading: true, |
| 174 | + }, |
| 175 | + }, |
| 176 | + |
| 177 | + sitemap: { |
| 178 | + hostname: "https://gocron.io", |
| 179 | + }, |
| 180 | + |
| 181 | + themeConfig: { |
| 182 | + socialLinks: [ |
| 183 | + { |
| 184 | + icon: "github", |
| 185 | + link: "https://github.com/gocronx-team/gocron", |
| 186 | + }, |
| 187 | + ], |
| 188 | + search: { |
| 189 | + provider: "local", |
| 190 | + options: { |
| 191 | + locales: { |
| 192 | + zh: { |
| 193 | + translations: { |
| 194 | + button: { |
| 195 | + buttonText: '搜索文档', |
| 196 | + buttonAriaLabel: '搜索文档' |
| 197 | + }, |
| 198 | + modal: { |
| 199 | + noResultsText: '无法找到相关结果', |
| 200 | + resetButtonTitle: '清除查询条件', |
| 201 | + footer: { |
| 202 | + selectText: '选择', |
| 203 | + navigateText: '切换' |
| 204 | + } |
| 205 | + } |
| 206 | + } |
| 207 | + } |
| 208 | + } |
| 209 | + } |
| 210 | + }, |
| 211 | + }, |
| 212 | +}); |
0 commit comments