Skip to content

Commit d68bd57

Browse files
committed
fix: correct homepage date, update READMEs, fix repo links, remove stale files
- Fix invitation event date 2025-04-16 → 2026-04-16 on both en/zh-cn index pages - Rewrite README.md and README.zh-CN.md to match actual repo structure - Remove non-existent directories (getting-started, platform-policies, faq) - Change npm → pnpm to match packageManager setting - Add actual components, scripts, pages to repo structure tree - Add turndown to tech stack, Copy-for-LLMs check to quality checks - Clarify openapi.json vs openapi.swagger.json - Delete orphan docs/next-steps.md (internal dev memo, not linked anywhere) - Update GitHub demo repo links to new names: PythonScirptDemo → Python-Worker-Demo NodeScirptDemo → Node-Worker-Demo GoScirptDemo → Go-Worker-Demo - Remove stale dev comment from astro.config.mjs
1 parent ed4899d commit d68bd57

14 files changed

Lines changed: 48 additions & 274 deletions

File tree

README.md

Lines changed: 0 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +0,0 @@
1-
# CoreClaw Documentation
2-
3-
This repository contains the source content and configuration for the CoreClaw documentation site at [docs.coreclaw.com](https://docs.coreclaw.com/), built with [Astro](https://astro.build/) and [Starlight](https://starlight.astro.build/).
4-
5-
For the Chinese version of this guide, see [`README.zh-CN.md`](./README.zh-CN.md).
6-
7-
## Documentation Architecture
8-
9-
The CoreClaw docs are organized into distinct content areas, each serving a specific audience:
10-
11-
### Content Areas
12-
13-
| Section | Audience | Purpose |
14-
| --- | --- | --- |
15-
| Getting Started | New users | Platform overview, account setup, first Worker run |
16-
| User Guide | End users | Running Workers, viewing results, pricing, API calls |
17-
| Developer Guide | Worker developers | Building, testing, publishing, and monetizing Workers |
18-
| API Reference | API consumers | Complete endpoint documentation with request/response schemas |
19-
| Website Events | All users | Platform events and promotions |
20-
| Platform Policies | All users | Terms, privacy, and usage policies |
21-
| FAQ | All users | Common questions and troubleshooting |
22-
| Changelog | All users | Platform and documentation updates |
23-
24-
### Multi-Language Structure
25-
26-
- **English** (`/`) — default language, authoritatively maintained
27-
- **Simplified Chinese** (`/zh-cn/`) — full translation maintained in parallel
28-
29-
All content directories under `src/content/docs/` and `src/content/docs/zh-cn/` mirror each other. When adding or updating content, both language versions should be kept in sync.
30-
31-
## Key Conventions
32-
33-
### Worker / Scraper Terminology
34-
35-
The CoreClaw platform uses two terms for the same concept:
36-
37-
- **Worker** — used throughout the documentation and UI to refer to a data extraction script
38-
- **Scraper** — used in API paths and field names for backward compatibility (`scraper_slug`, `/api/v1/scraper/run`)
39-
40-
### API Documentation
41-
42-
The API reference is structured around endpoint groups:
43-
44-
- **Worker**`/api/v1/scraper/*` endpoints for starting, aborting, and inspecting Worker runs
45-
- **Runs**`/api/v1/run/*` endpoints for history, results, logs, and exports
46-
- **Tasks**`/api/v1/task/*` endpoints for saved Task templates
47-
- **Account**`/api/v1/account/*` endpoints for user account information
48-
49-
Each endpoint page documents the HTTP method, path, request parameters, response schema, and error codes. The [API index page](https://docs.coreclaw.com/api/) includes a complete endpoint quick reference table.
50-
51-
An `openapi.swagger.json` file is kept locally for API schema reference but is excluded from version control (see `.gitignore`).
52-
53-
### Sidebar Configuration
54-
55-
Navigation is defined manually in `astro.config.mjs` using explicit `items` arrays. This gives full control over:
56-
- Section labels and ordering
57-
- Translation of labels across languages
58-
- Collapsible groups and nesting depth
59-
- Badge annotations (e.g., "Required")
60-
61-
## Repository Structure
62-
63-
```text
64-
.
65-
├── public/ # Static assets served as-is
66-
├── src/
67-
│ ├── assets/ # Images and logos used at build time
68-
│ ├── components/ # Custom Astro components (Header, Banner, TOC)
69-
│ ├── content/docs/ # English documentation (default locale)
70-
│ │ ├── api/ # API reference
71-
│ │ ├── developer-guide/ # Developer documentation
72-
│ │ ├── user-guide/ # End-user documentation
73-
│ │ ├── getting-started/ # Onboarding
74-
│ │ ├── website-events/ # Events and promotions
75-
│ │ ├── platform-policies/ # Legal and policy pages
76-
│ │ ├── faq/ # Frequently asked questions
77-
│ │ ├── changelog.mdx # Changelog
78-
│ │ └── zh-cn/ # Simplified Chinese mirror
79-
│ └── styles/common.css # Global CSS overrides
80-
├── astro.config.mjs # Astro + Starlight configuration
81-
├── package.json
82-
└── tsconfig.json
83-
```
84-
85-
## Tech Stack
86-
87-
| Component | Role |
88-
| --- | --- |
89-
| [Astro](https://astro.build/) | Static site generator |
90-
| [Starlight](https://starlight.astro.build/) | Documentation theme (sidebar, search, i18n) |
91-
| [React](https://react.dev/) | Interactive UI components |
92-
| `starlight-image-zoom` | Image zoom plugin |
93-
| `sharp` | Image optimization |
94-
95-
## Local Development
96-
97-
```bash
98-
npm install # Install dependencies (Node.js 18+, npm 9+)
99-
npm run dev # Start dev server at http://localhost:4321
100-
npm run build # Build to dist/
101-
npm run preview # Preview built output
102-
```
103-
104-
## Quality Checks
105-
106-
Before committing, run `npm run build` and verify:
107-
108-
- No content rendering errors
109-
- Sidebar order matches expectations in both languages
110-
- English and Chinese pages are structurally aligned
111-
- No broken internal links or missing asset references
112-
113-
## References
114-
115-
- [Astro Documentation](https://docs.astro.build/)
116-
- [Starlight Documentation](https://starlight.astro.build/)
117-
- [CoreClaw Docs (live)](https://docs.coreclaw.com/)

README.zh-CN.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@ CoreClaw 文档按受众划分为以下内容区域:
1212

1313
| 区域 | 受众 | 内容 |
1414
| --- | --- | --- |
15-
| 快速入门 | 新用户 | 平台概览、账号注册、首次运行 Worker |
16-
| 用户指南 | 终端用户 | 运行 Worker、查看结果、计费规则、API 调用 |
15+
| 用户指南 | 终端用户 | 运行 Worker、查看结果、计费规则、API 调用、常见问题 |
1716
| 开发者指南 | Worker 开发者 | 构建、测试、发布和变现 Worker |
1817
| API 参考 | API 调用方 | 完整的接口文档,含请求/响应 schema |
1918
| 网站活动 | 所有用户 | 平台活动与推广 |
20-
| 平台政策 | 所有用户 | 条款、隐私、使用政策 |
21-
| 常见问题 | 所有用户 | 常见疑问与排障 |
2219
| 更新日志 | 所有用户 | 平台与文档更新记录 |
2320

2421
### 多语言结构
@@ -48,7 +45,7 @@ API 参考按端点组组织:
4845

4946
每个端点页面记录了 HTTP 方法、路径、请求参数、响应 schema 和错误码。[API 索引页](https://docs.coreclaw.com/zh-cn/api/) 提供了完整的端点速查表。
5047

51-
`openapi.swagger.json` 文件仅供本地 API schema 参考,不纳入版本控制(见 `.gitignore`)。
48+
OpenAPI 规范文件位于 `public/openapi.json`,通过 `/openapi.json` 对外提供。`openapi.swagger.json` 文件仅供本地参考,不纳入版本控制(见 `.gitignore`)。
5249

5350
### 侧边栏配置
5451

@@ -63,20 +60,31 @@ API 参考按端点组组织:
6360
```text
6461
.
6562
├── public/ # 静态资源(直接输出)
63+
│ ├── openapi.json # OpenAPI 规范(通过 /openapi.json 提供)
64+
│ ├── favicon.jpg # 站点图标
65+
│ └── logo.png # 站点 Logo
6666
├── src/
6767
│ ├── assets/ # 构建期资源(图片、logo)
68-
│ ├── components/ # 自定义 Astro 组件(Header、Banner、目录)
68+
│ │ └── docs/ # 文档截图
69+
│ ├── components/ # 自定义 Astro 组件
70+
│ │ ├── ApiPlayground.astro # 交互式 API 调试表单
71+
│ │ ├── CopyForLLMs.astro # 复制给 LLM 头部下拉
72+
│ │ ├── Banner.astro # 站点横幅
73+
│ │ ├── Header.astro # 自定义页头
74+
│ │ ├── Footer.astro # 自定义页脚
75+
│ │ └── ... # 其他覆盖组件
6976
│ ├── content/docs/ # 英文文档(默认语言)
7077
│ │ ├── api/ # API 参考
7178
│ │ ├── developer-guide/ # 开发者文档
7279
│ │ ├── user-guide/ # 用户文档
73-
│ │ ├── getting-started/ # 快速入门
7480
│ │ ├── website-events/ # 活动推广
75-
│ │ ├── platform-policies/ # 法律与政策
76-
│ │ ├── faq/ # 常见问题
77-
│ │ ├── changelog.mdx # 更新日志
81+
│ │ ├── home.mdx # 首页
82+
│ │ ├── changelog.mdx # 更新日志
7883
│ │ └── zh-cn/ # 简体中文镜像
84+
│ ├── pages/ # 动态路由(Copy-for-LLMs .md 导出)
7985
│ └── styles/common.css # 全局样式覆盖
86+
├── scripts/
87+
│ └── check-copy-for-llms.mjs # 构建后冒烟测试(.md 导出完整性)
8088
├── astro.config.mjs # Astro + Starlight 配置
8189
├── package.json
8290
└── tsconfig.json
@@ -91,24 +99,26 @@ API 参考按端点组组织:
9199
| [React](https://react.dev/) | 交互式 UI 组件 |
92100
| `starlight-image-zoom` | 图片缩放插件 |
93101
| `sharp` | 图片优化 |
102+
| `turndown` | HTML 转 Markdown(Copy-for-LLMs) |
94103

95104
## 本地开发
96105

97106
```bash
98-
npm install # 安装依赖(Node.js 18+,npm 9+)
99-
npm run dev # 启动开发服务器 http://localhost:4321
100-
npm run build # 构建至 dist/
101-
npm run preview # 预览构建结果
107+
pnpm install # 安装依赖(Node.js 22+,pnpm 10+)
108+
pnpm run dev # 启动开发服务器 http://localhost:4321
109+
pnpm run build # 构建至 dist/(含 Copy-for-LLMs 检查)
110+
pnpm run preview # 预览构建结果
102111
```
103112

104113
## 质量检查
105114

106-
提交前执行 `npm run build`,确认:
115+
提交前执行 `pnpm run build`,确认:
107116

108117
- 无内容渲染错误
109118
- 中英文侧边栏顺序一致
110119
- 中英文页面结构对齐
111120
- 无断链或缺失资源引用
121+
- Copy-for-LLMs 冒烟测试通过(每个文档页面导出非空 Markdown)
112122

113123
## 参考链接
114124

astro.config.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,6 @@ export default defineConfig({
581581
},
582582
],
583583
},
584-
// Single-endpoint group flattened — was a one-item
585-
// collapsible folder, now shows up directly.
586584
{
587585
label: 'Start Task',
588586
slug: 'api/task/run',

docs/next-steps.md

Lines changed: 0 additions & 117 deletions
This file was deleted.

src/content/docs/developer-guide/develop-worker/quick-start.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@ Local mode development support (running Workers locally with the CoreClaw SDK) i
3535

3636
Choose your preferred language and clone the demo repository:
3737

38-
- **Python**: [PythonScirptDemo](https://github.com/Core-Claw/PythonScirptDemo)
39-
- **Node.js**: [NodeScirptDemo](https://github.com/Core-Claw/NodeScirptDemo)
40-
- **Go**: [GoScirptDemo](https://github.com/Core-Claw/GoScirptDemo)
38+
- **Python**: [Python-Worker-Demo](https://github.com/Core-Claw/Python-Worker-Demo)
39+
- **Node.js**: [Node-Worker-Demo](https://github.com/Core-Claw/Node-Worker-Demo)
40+
- **Go**: [Go-Worker-Demo](https://github.com/Core-Claw/Go-Worker-Demo)
4141

4242
```bash
4343
# Python
44-
git clone https://github.com/Core-Claw/PythonScirptDemo.git
44+
git clone https://github.com/Core-Claw/Python-Worker-Demo.git
4545

4646
# Node.js
47-
git clone https://github.com/Core-Claw/NodeScirptDemo.git
47+
git clone https://github.com/Core-Claw/Node-Worker-Demo.git
4848

4949
# Go
50-
git clone https://github.com/Core-Claw/GoScirptDemo.git
50+
git clone https://github.com/Core-Claw/Go-Worker-Demo.git
5151
```
5252

5353
### 2. Project Structure

src/content/docs/developer-guide/worker-definition/examples/go-example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Learn how to build a Worker using Go.
1010
## GitHub Repository
1111

1212
Go Script Demo Repository:
13-
[GoScirptDemo](https://github.com/Core-Claw/GoScirptDemo)
13+
[Go-Worker-Demo](https://github.com/Core-Claw/Go-Worker-Demo)
1414

1515
---
1616

src/content/docs/developer-guide/worker-definition/examples/nodejs-example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Learn how to build a Worker using Node.js.
1010
## GitHub Repository
1111

1212
Node.js Script Demo Repository:
13-
[NodeScirptDemo](https://github.com/Core-Claw/NodeScirptDemo)
13+
[Node-Worker-Demo](https://github.com/Core-Claw/Node-Worker-Demo)
1414

1515
---
1616

src/content/docs/developer-guide/worker-definition/examples/python-example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Learn how to build a Worker using Python.
1010
## GitHub Repository
1111

1212
Python Script Demo Repository:
13-
[PythonScirptDemo](https://github.com/Core-Claw/PythonScirptDemo)
13+
[Python-Worker-Demo](https://github.com/Core-Claw/Python-Worker-Demo)
1414

1515
---
1616

0 commit comments

Comments
 (0)