|
1 | | -import { defineConfig } from 'vitepress' |
| 1 | +import { defineConfig } from "vitepress"; |
2 | 2 |
|
3 | | -const repoUrl = 'https://github.com/1024XEngineer/neo-code' |
| 3 | +const repoUrl = "https://github.com/1024XEngineer/neo-code"; |
| 4 | +const docsBase = `${repoUrl}/blob/main/docs`; |
| 5 | +const siteUrl = "https://1024xengineer.github.io/neo-code/"; |
| 6 | +const brandImageUrl = `${siteUrl}brand/neocode-mark.png`; |
4 | 7 |
|
5 | 8 | export default defineConfig({ |
6 | | - title: 'NeoCode', |
7 | | - description: '基于 Go + Bubble Tea 的本地 Coding Agent', |
8 | | - lang: 'zh-CN', |
9 | | - base: '/neo-code/', |
| 9 | + title: "NeoCode", |
| 10 | + description: "基于 Go + Bubble Tea 的本地 Coding Agent 用户指南", |
| 11 | + lang: "zh-CN", |
| 12 | + base: "/neo-code/", |
10 | 13 | cleanUrls: true, |
11 | 14 | lastUpdated: true, |
12 | 15 | head: [ |
13 | | - ['meta', { name: 'theme-color', content: '#0f766e' }], |
14 | | - ['meta', { property: 'og:title', content: 'NeoCode' }], |
| 16 | + ["meta", { name: "theme-color", content: "#090B1A" }], |
| 17 | + ["meta", { property: "og:title", content: "NeoCode 用户指南" }], |
15 | 18 | [ |
16 | | - 'meta', |
| 19 | + "meta", |
17 | 20 | { |
18 | | - property: 'og:description', |
19 | | - content: '一个围绕 ReAct 主链路构建的本地 Go + Bubble Tea Coding Agent。' |
20 | | - } |
| 21 | + property: "og:description", |
| 22 | + content: |
| 23 | + "围绕真实命令、配置与 Gateway 使用场景整理的 NeoCode 用户指导网站。", |
| 24 | + }, |
21 | 25 | ], |
22 | | - ['meta', { property: 'og:type', content: 'website' }], |
23 | | - ['link', { rel: 'icon', href: '/neo-code/brand/neocode-mark.svg' }] |
| 26 | + ["meta", { property: "og:type", content: "website" }], |
| 27 | + [ |
| 28 | + "meta", |
| 29 | + { |
| 30 | + property: "og:image", |
| 31 | + content: brandImageUrl, |
| 32 | + }, |
| 33 | + ], |
| 34 | + ["meta", { name: "twitter:card", content: "summary" }], |
| 35 | + ["link", { rel: "icon", href: "/neo-code/brand/neocode-mark.png" }], |
24 | 36 | ], |
| 37 | + markdown: { |
| 38 | + config(md) { |
| 39 | + md.linkify.set({ fuzzyLink: false }); |
| 40 | + }, |
| 41 | + }, |
25 | 42 | themeConfig: { |
26 | | - logo: '/brand/neocode-mark.svg', |
27 | | - siteTitle: 'NeoCode', |
| 43 | + logo: "/brand/neocode-mark.png", |
| 44 | + siteTitle: "NeoCode", |
28 | 45 | search: { |
29 | | - provider: 'local' |
| 46 | + provider: "local", |
30 | 47 | }, |
31 | | - socialLinks: [ |
32 | | - { icon: 'github', link: repoUrl } |
33 | | - ] |
| 48 | + socialLinks: [{ icon: "github", link: repoUrl }], |
34 | 49 | }, |
35 | 50 | locales: { |
36 | 51 | root: { |
37 | | - label: '简体中文', |
38 | | - lang: 'zh-CN', |
39 | | - link: '/', |
| 52 | + label: "简体中文", |
| 53 | + lang: "zh-CN", |
| 54 | + link: "/", |
40 | 55 | themeConfig: { |
41 | 56 | nav: [ |
42 | | - { text: '文档', link: '/docs/quick-start' }, |
43 | | - { text: 'GitHub', link: repoUrl } |
| 57 | + { text: "开始使用", link: "/guide/" }, |
| 58 | + { text: "配置", link: "/guide/configuration" }, |
| 59 | + { text: "命令与会话", link: "/guide/quick-start" }, |
| 60 | + { text: "Gateway", link: "/guide/gateway" }, |
| 61 | + { text: "深入阅读", link: "/reference/" }, |
| 62 | + { text: "GitHub", link: repoUrl }, |
44 | 63 | ], |
45 | 64 | sidebar: { |
46 | | - '/docs/': [ |
47 | | - { text: '快速开始', link: '/docs/quick-start' }, |
| 65 | + "/guide/": [ |
48 | 66 | { |
49 | | - text: '使用指南', |
| 67 | + text: "开始使用", |
50 | 68 | items: [ |
51 | | - { text: '配置', link: '/docs/guides/configuration' }, |
52 | | - { text: '切换模型', link: '/docs/guides/providers' }, |
53 | | - { text: 'MCP 配置', link: '/docs/guides/mcp' }, |
54 | | - { text: '更新升级', link: '/docs/guides/update' } |
55 | | - ] |
| 69 | + { text: "总览", link: "/guide/" }, |
| 70 | + { text: "NeoCode 是什么", link: "/guide/getting-started" }, |
| 71 | + { text: "安装与运行", link: "/guide/install" }, |
| 72 | + { text: "首次上手", link: "/guide/quick-start" }, |
| 73 | + ], |
56 | 74 | }, |
57 | 75 | { |
58 | | - text: '参考', |
| 76 | + text: "日常使用", |
59 | 77 | items: [ |
60 | | - { text: '架构概览', link: '/docs/reference/architecture' } |
61 | | - ] |
62 | | - } |
63 | | - ] |
64 | | - }, |
65 | | - footer: { |
66 | | - message: '围绕可验证主链路构建的本地 Coding Agent。', |
67 | | - copyright: 'MIT Licensed' |
| 78 | + { text: "配置入口", link: "/guide/configuration" }, |
| 79 | + { text: "工作区与会话", link: "/guide/workspace-session" }, |
| 80 | + { text: "记忆与 Skills", link: "/guide/memo-skills" }, |
| 81 | + { text: "Gateway 与 URL Dispatch", link: "/guide/gateway" }, |
| 82 | + { text: "升级与版本检查", link: "/guide/update" }, |
| 83 | + ], |
| 84 | + }, |
| 85 | + ], |
| 86 | + "/reference/": [ |
| 87 | + { |
| 88 | + text: "深入阅读", |
| 89 | + items: [ |
| 90 | + { text: "文档导航", link: "/reference/" }, |
| 91 | + { text: "旧入口兼容页", link: "/docs/" }, |
| 92 | + ], |
| 93 | + }, |
| 94 | + ], |
| 95 | + "/docs/": [ |
| 96 | + { |
| 97 | + text: "文档入口", |
| 98 | + items: [ |
| 99 | + { text: "总览", link: "/docs/" }, |
| 100 | + { text: "开始使用", link: "/guide/" }, |
| 101 | + { text: "深入阅读", link: "/reference/" }, |
| 102 | + ], |
| 103 | + }, |
| 104 | + ], |
| 105 | + "/": [ |
| 106 | + { |
| 107 | + text: "快速导航", |
| 108 | + items: [ |
| 109 | + { text: "开始使用", link: "/guide/" }, |
| 110 | + { text: "安装与运行", link: "/guide/install" }, |
| 111 | + { text: "首次上手", link: "/guide/quick-start" }, |
| 112 | + { text: "配置入口", link: "/guide/configuration" }, |
| 113 | + ], |
| 114 | + }, |
| 115 | + ], |
68 | 116 | }, |
69 | 117 | outline: { |
70 | | - label: '本页目录' |
| 118 | + level: [2, 3], |
| 119 | + label: "本页目录", |
71 | 120 | }, |
72 | | - returnToTopLabel: '返回顶部', |
73 | | - sidebarMenuLabel: '菜单', |
74 | | - darkModeSwitchLabel: '主题', |
75 | | - lightModeSwitchTitle: '切换到浅色模式', |
76 | | - darkModeSwitchTitle: '切换到深色模式' |
77 | | - } |
| 121 | + docFooter: { |
| 122 | + prev: "上一页", |
| 123 | + next: "下一页", |
| 124 | + }, |
| 125 | + editLink: { |
| 126 | + pattern: `${repoUrl}/edit/main/www/:path`, |
| 127 | + text: "在 GitHub 上编辑此页", |
| 128 | + }, |
| 129 | + footer: { |
| 130 | + message: "围绕真实命令、配置与主链路整理的 NeoCode 用户指南。", |
| 131 | + copyright: "MIT Licensed", |
| 132 | + }, |
| 133 | + returnToTopLabel: "返回顶部", |
| 134 | + sidebarMenuLabel: "菜单", |
| 135 | + darkModeSwitchLabel: "主题", |
| 136 | + lightModeSwitchTitle: "切换到浅色模式", |
| 137 | + darkModeSwitchTitle: "切换到深色模式", |
| 138 | + }, |
78 | 139 | }, |
79 | 140 | en: { |
80 | | - label: 'English', |
81 | | - lang: 'en-US', |
82 | | - link: '/en/', |
83 | | - description: 'A local Go + Bubble Tea coding agent built around a verifiable ReAct loop.', |
| 141 | + label: "English", |
| 142 | + lang: "en-US", |
| 143 | + link: "/en/", |
| 144 | + description: |
| 145 | + "A compact NeoCode docs entrypoint focused on current, verifiable behavior.", |
84 | 146 | themeConfig: { |
85 | 147 | nav: [ |
86 | | - { text: 'Docs', link: '/en/docs/quick-start' }, |
87 | | - { text: 'GitHub', link: repoUrl } |
| 148 | + { text: "Home", link: "/en/" }, |
| 149 | + { text: "Docs", link: "/en/docs/" }, |
| 150 | + { text: "GitHub", link: repoUrl }, |
88 | 151 | ], |
89 | 152 | sidebar: { |
90 | | - '/en/docs/': [ |
91 | | - { text: 'Quick Start', link: '/en/docs/quick-start' }, |
| 153 | + "/en/docs/": [ |
92 | 154 | { |
93 | | - text: 'Guides', |
| 155 | + text: "Overview", |
94 | 156 | items: [ |
95 | | - { text: 'Configuration', link: '/en/docs/guides/configuration' }, |
96 | | - { text: 'Switching Models', link: '/en/docs/guides/providers' }, |
97 | | - { text: 'MCP Configuration', link: '/en/docs/guides/mcp' }, |
98 | | - { text: 'Updating', link: '/en/docs/guides/update' } |
99 | | - ] |
| 157 | + { text: "Docs Index", link: "/en/docs/" }, |
| 158 | + { text: "Chinese Guide", link: "/guide/" }, |
| 159 | + { text: "Architecture Notes", link: "/reference/" }, |
| 160 | + ], |
100 | 161 | }, |
101 | | - { |
102 | | - text: 'Reference', |
103 | | - items: [ |
104 | | - { text: 'Architecture', link: '/en/docs/reference/architecture' } |
105 | | - ] |
106 | | - } |
107 | | - ] |
108 | | - }, |
109 | | - footer: { |
110 | | - message: 'A local coding agent shaped around a verifiable execution loop.', |
111 | | - copyright: 'MIT Licensed' |
| 162 | + ], |
112 | 163 | }, |
113 | 164 | outline: { |
114 | | - label: 'On this page' |
| 165 | + level: [2, 3], |
| 166 | + label: "On this page", |
| 167 | + }, |
| 168 | + docFooter: { |
| 169 | + prev: "Previous page", |
| 170 | + next: "Next page", |
115 | 171 | }, |
116 | | - returnToTopLabel: 'Back to top', |
117 | | - sidebarMenuLabel: 'Menu', |
118 | | - darkModeSwitchLabel: 'Appearance', |
119 | | - lightModeSwitchTitle: 'Switch to light theme', |
120 | | - darkModeSwitchTitle: 'Switch to dark theme' |
121 | | - } |
122 | | - } |
| 172 | + editLink: { |
| 173 | + pattern: `${repoUrl}/edit/main/www/:path`, |
| 174 | + text: "Edit this page on GitHub", |
| 175 | + }, |
| 176 | + footer: { |
| 177 | + message: |
| 178 | + "A compact docs entrypoint built from NeoCode's current implementation.", |
| 179 | + copyright: "MIT Licensed", |
| 180 | + }, |
| 181 | + returnToTopLabel: "Back to top", |
| 182 | + sidebarMenuLabel: "Menu", |
| 183 | + darkModeSwitchLabel: "Appearance", |
| 184 | + lightModeSwitchTitle: "Switch to light theme", |
| 185 | + darkModeSwitchTitle: "Switch to dark theme", |
| 186 | + }, |
| 187 | + }, |
123 | 188 | }, |
124 | | - markdown: { |
125 | | - config(md) { |
126 | | - md.linkify.set({ fuzzyLink: false }) |
127 | | - } |
128 | | - } |
129 | | -}) |
| 189 | + sitemap: { |
| 190 | + hostname: siteUrl, |
| 191 | + }, |
| 192 | + vite: { |
| 193 | + define: { |
| 194 | + __NEOCODE_DOCS_BASE__: JSON.stringify(docsBase), |
| 195 | + }, |
| 196 | + }, |
| 197 | +}); |
0 commit comments