Skip to content

Commit 845edcd

Browse files
authored
Merge pull request #401 from Yumiue/codex/github-pages-vitepress-site
[codex] 新增 GitHub Pages VitePress 项目介绍站点
2 parents 1289071 + ab091ef commit 845edcd

15 files changed

Lines changed: 2516 additions & 0 deletions

File tree

.github/workflows/pages.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Deploy VitePress Site
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v5
24+
with:
25+
fetch-depth: 1
26+
27+
- name: Setup pnpm
28+
uses: pnpm/action-setup@v4
29+
with:
30+
run_install: false
31+
32+
- name: Setup Node
33+
uses: actions/setup-node@v6
34+
with:
35+
node-version: 24
36+
cache: pnpm
37+
cache-dependency-path: www/pnpm-lock.yaml
38+
39+
- name: Setup Pages
40+
uses: actions/configure-pages@v4
41+
42+
- name: Install dependencies
43+
working-directory: www
44+
run: pnpm install --frozen-lockfile
45+
46+
- name: Build with VitePress
47+
working-directory: www
48+
run: pnpm docs:build
49+
50+
- name: Upload artifact
51+
uses: actions/upload-pages-artifact@v3
52+
with:
53+
path: www/.vitepress/dist
54+
55+
deploy:
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
needs: build
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ profile.cov
1818

1919
# Dependency directories
2020
# vendor/
21+
node_modules/
22+
.pnpm-store/
2123

2224
# Go workspace file
2325
go.work
@@ -38,3 +40,7 @@ data/
3840
workspace.xml
3941
.vscode/
4042
.claude/
43+
44+
# VitePress / frontend build artifacts
45+
www/.vitepress/cache/
46+
www/.vitepress/dist/

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@ NeoCode 是一个在终端中运行的 AI 编码助手,采用 ReAct(Reason-A
99

1010
它适合希望在本地工作流中完成代码理解、修改、调试与自动化操作的开发者。
1111

12+
## 项目介绍页
13+
14+
- 仓库内置了基于 VitePress 的 GitHub Pages 站点源码,目录为 `www/`
15+
- 启用仓库的 GitHub Pages 并选择 `GitHub Actions` 后,站点将发布到:
16+
`https://<仓库拥有者>.github.io/neo-code/`
17+
- 本地预览站点可使用:
18+
```bash
19+
cd www
20+
pnpm install
21+
pnpm docs:dev
22+
```
23+
- 开发服务器启动后,默认从 `http://localhost:5173/neo-code/` 访问首页
24+
1225
## 有什么能力?
1326
- 终端原生 TUI 交互体验(Bubble Tea)
1427
- Agent 可调用内置工具完成文件与命令相关任务

www/.vitepress/config.mts

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
const repoUrl = 'https://github.com/1024XEngineer/neo-code'
4+
5+
export default defineConfig({
6+
title: 'NeoCode',
7+
description: '基于 Go + Bubble Tea 的本地 Coding Agent',
8+
lang: 'zh-CN',
9+
base: '/neo-code/',
10+
cleanUrls: true,
11+
lastUpdated: true,
12+
head: [
13+
['meta', { name: 'theme-color', content: '#0f766e' }],
14+
['meta', { property: 'og:title', content: 'NeoCode' }],
15+
[
16+
'meta',
17+
{
18+
property: 'og:description',
19+
content: '一个围绕 ReAct 主链路构建的本地 Go + Bubble Tea Coding Agent。'
20+
}
21+
],
22+
['meta', { property: 'og:type', content: 'website' }],
23+
['link', { rel: 'icon', href: '/neo-code/brand/neocode-mark.svg' }]
24+
],
25+
themeConfig: {
26+
logo: '/brand/neocode-mark.svg',
27+
siteTitle: 'NeoCode',
28+
search: {
29+
provider: 'local'
30+
},
31+
socialLinks: [
32+
{ icon: 'github', link: repoUrl }
33+
]
34+
},
35+
locales: {
36+
root: {
37+
label: '简体中文',
38+
lang: 'zh-CN',
39+
link: '/',
40+
themeConfig: {
41+
nav: [
42+
{ text: '首页', link: '/' },
43+
{ text: '文档入口', link: '/docs/' },
44+
{ text: 'GitHub', link: repoUrl }
45+
],
46+
footer: {
47+
message: '围绕可验证主链路构建的本地 Coding Agent。',
48+
copyright: 'MIT Licensed'
49+
},
50+
outline: {
51+
label: '本页目录'
52+
},
53+
returnToTopLabel: '返回顶部',
54+
sidebarMenuLabel: '菜单',
55+
darkModeSwitchLabel: '主题',
56+
lightModeSwitchTitle: '切换到浅色模式',
57+
darkModeSwitchTitle: '切换到深色模式'
58+
}
59+
},
60+
en: {
61+
label: 'English',
62+
lang: 'en-US',
63+
link: '/en/',
64+
description: 'A local Go + Bubble Tea coding agent built around a verifiable ReAct loop.',
65+
themeConfig: {
66+
nav: [
67+
{ text: 'Home', link: '/en/' },
68+
{ text: 'Docs', link: '/en/docs/' },
69+
{ text: 'GitHub', link: repoUrl }
70+
],
71+
footer: {
72+
message: 'A local coding agent shaped around a verifiable execution loop.',
73+
copyright: 'MIT Licensed'
74+
},
75+
outline: {
76+
label: 'On this page'
77+
},
78+
returnToTopLabel: 'Back to top',
79+
sidebarMenuLabel: 'Menu',
80+
darkModeSwitchLabel: 'Appearance',
81+
lightModeSwitchTitle: 'Switch to light theme',
82+
darkModeSwitchTitle: 'Switch to dark theme'
83+
}
84+
}
85+
},
86+
markdown: {
87+
config(md) {
88+
md.linkify.set({ fuzzyLink: false })
89+
}
90+
}
91+
})
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<script setup lang="ts">
2+
defineProps<{
3+
locale?: 'zh' | 'en'
4+
}>()
5+
</script>
6+
7+
<template>
8+
<div class="info-grid">
9+
<div class="info-card architecture-block">
10+
<h3>{{ locale === 'en' ? 'Core layering' : '核心分层' }}</h3>
11+
<pre><code>TUI -&gt; Runtime -&gt; Provider / Tool Manager</code></pre>
12+
<p v-if="locale === 'en'">
13+
New capabilities are expected to join the main path, not bypass it with ad-hoc UI logic or direct tool execution.
14+
</p>
15+
<p v-else>
16+
新能力默认沿主链路接入,不在 TUI 或 runtime 里直接写工具执行逻辑。
17+
</p>
18+
</div>
19+
20+
<div class="info-card">
21+
<h3>{{ locale === 'en' ? 'Key modules' : '关键模块' }}</h3>
22+
<div class="info-lines" v-if="locale === 'en'">
23+
<p><code>internal/runtime</code>: ReAct loop, event stream, tool-call orchestration</p>
24+
<p><code>internal/tools</code>: tool contracts, validation, execution, and result normalization</p>
25+
<p><code>internal/provider</code>: model protocol differences, request shaping, response parsing</p>
26+
<p><code>internal/tui</code>: Bubble Tea state machine and runtime event rendering</p>
27+
</div>
28+
<div class="info-lines" v-else>
29+
<p><code>internal/runtime</code>:ReAct 主循环、事件流、tool call 编排</p>
30+
<p><code>internal/tools</code>:工具契约、参数校验、执行与结果收敛</p>
31+
<p><code>internal/provider</code>:模型协议差异、请求组装与响应解析</p>
32+
<p><code>internal/tui</code>:Bubble Tea 状态机与 runtime 事件展示</p>
33+
</div>
34+
</div>
35+
</div>
36+
</template>
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<script setup lang="ts">
2+
defineProps<{
3+
locale?: 'zh' | 'en'
4+
}>()
5+
</script>
6+
7+
<template>
8+
<div class="quickstart-grid" v-if="locale === 'en'">
9+
<article class="quickstart-card">
10+
<p class="quickstart-kicker">Try Now</p>
11+
<h3>One-line install</h3>
12+
<p>Best for visitors who want the fastest path to a working local setup.</p>
13+
<p><strong>macOS / Linux</strong></p>
14+
<pre><code>curl -fsSL https://raw.githubusercontent.com/1024XEngineer/neo-code/main/scripts/install.sh | bash</code></pre>
15+
<p><strong>Windows PowerShell</strong></p>
16+
<pre><code>irm https://raw.githubusercontent.com/1024XEngineer/neo-code/main/scripts/install.ps1 | iex</code></pre>
17+
</article>
18+
19+
<article class="quickstart-card">
20+
<p class="quickstart-kicker">From Source</p>
21+
<h3>Run from source</h3>
22+
<p>Best for contributors who want to inspect the code, debug behavior, or wire new features in directly.</p>
23+
<pre><code>git clone https://github.com/1024XEngineer/neo-code.git
24+
cd neo-code
25+
go run ./cmd/neocode</code></pre>
26+
<p><strong>Set API keys</strong></p>
27+
<pre><code>export OPENAI_API_KEY="your_key_here"
28+
export GEMINI_API_KEY="your_key_here"
29+
export AI_API_KEY="your_key_here"
30+
export QINIU_API_KEY="your_key_here"</code></pre>
31+
</article>
32+
33+
<article class="quickstart-card">
34+
<p class="quickstart-kicker">Next Step</p>
35+
<h3>More setup</h3>
36+
<p>Go deeper when you need workspace isolation, gateway mode, or the full install and upgrade guide.</p>
37+
<div class="quickstart-links">
38+
<p>Workspace isolation: <code>--workdir</code></p>
39+
<p>Gateway mode: <code>--runtime-mode gateway</code></p>
40+
<p><a href="https://github.com/1024XEngineer/neo-code/blob/main/README.md">README</a></p>
41+
<p><a href="/neo-code/en/docs/">Docs index</a></p>
42+
</div>
43+
</article>
44+
</div>
45+
46+
<div class="quickstart-grid" v-else>
47+
<article class="quickstart-card">
48+
<p class="quickstart-kicker">Try Now</p>
49+
<h3>一键安装</h3>
50+
<p>适合想先试用 NeoCode 的访客,直接使用 README 中维护的安装脚本。</p>
51+
<p><strong>macOS / Linux</strong></p>
52+
<pre><code>curl -fsSL https://raw.githubusercontent.com/1024XEngineer/neo-code/main/scripts/install.sh | bash</code></pre>
53+
<p><strong>Windows PowerShell</strong></p>
54+
<pre><code>irm https://raw.githubusercontent.com/1024XEngineer/neo-code/main/scripts/install.ps1 | iex</code></pre>
55+
</article>
56+
57+
<article class="quickstart-card">
58+
<p class="quickstart-kicker">From Source</p>
59+
<h3>从源码运行</h3>
60+
<p>适合准备阅读代码、调试功能或直接参与开发的使用方式。</p>
61+
<pre><code>git clone https://github.com/1024XEngineer/neo-code.git
62+
cd neo-code
63+
go run ./cmd/neocode</code></pre>
64+
<p><strong>配置 API Key</strong></p>
65+
<pre><code>export OPENAI_API_KEY="your_key_here"
66+
export GEMINI_API_KEY="your_key_here"
67+
export AI_API_KEY="your_key_here"
68+
export QINIU_API_KEY="your_key_here"</code></pre>
69+
</article>
70+
71+
<article class="quickstart-card">
72+
<p class="quickstart-kicker">Next Step</p>
73+
<h3>更多配置</h3>
74+
<p>当你需要工作区隔离、网关模式、升级说明或完整命令列表时,再继续深入。</p>
75+
<div class="quickstart-links">
76+
<p>工作区隔离:<code>--workdir</code></p>
77+
<p>网关模式:<code>--runtime-mode gateway</code></p>
78+
<p><a href="https://github.com/1024XEngineer/neo-code/blob/main/README.md">README</a></p>
79+
<p><a href="/neo-code/docs/">文档入口页</a></p>
80+
</div>
81+
</article>
82+
</div>
83+
</template>

0 commit comments

Comments
 (0)