Skip to content

Commit 4c4d2b9

Browse files
committed
feat(docs): 📹 integrate tutorials component and update resource links
- Add TutorialsGrid component to index and getting-started pages - Update RelatedResources component with tutorials link - Simplify README resource links to point to docs site - Move tutorials section before workflow diagram in index - Replace individual tutorial links with unified docs links
1 parent 1ded160 commit 4c4d2b9

11 files changed

Lines changed: 445 additions & 43 deletions

README-ZH.md

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -334,15 +334,14 @@ CodeBuddy 已内置 CloudBase MCP,无需配置即可使用。
334334

335335
## 🧩 MCP 工具
336336

337-
**39 个工具**覆盖环境管理、数据库、云函数、静态托管、小程序发布等核心功能
337+
覆盖环境管理、数据库、云函数、静态托管等核心功能
338338

339339
| 分类 | 工具 | 核心功能 |
340340
|------|------|----------|
341341
| **环境** | 4 个 | 登录认证、环境查询、域名管理 |
342342
| **数据库** | 11 个 | 集合管理、文档 CRUD、索引、数据模型 |
343343
| **云函数** | 9 个 | 创建、更新、调用、日志、触发器 |
344344
| **静态托管** | 5 个 | 文件上传、域名配置、网站部署 |
345-
| **小程序** | 7 个 | 上传、预览、构建、配置、调试 |
346345
| **工具支持** | 4 个 | 模板、知识库搜索、联网搜索、交互对话 |
347346

348347
[查看完整工具文档](doc/mcp-tools.md) | [工具规格 JSON](scripts/tools.json)
@@ -352,31 +351,19 @@ CodeBuddy 已内置 CloudBase MCP,无需配置即可使用。
352351
### 文档
353352

354353
- [快速开始](https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/getting-started)
355-
- [IDE 配置指南](https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/ide-setup/)
354+
- [IDE 配置指南](https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/ide-setup/cursor)
356355
- [项目模板](https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/templates)
357356
- [开发指南](https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/development)
358357
- [插件系统](https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/plugins)
359358
- [常见问题](https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/faq)
360359

361360
### 教程
362361

363-
#### 文章
364-
- [用 CloudBase AI CLI 开发邻里闲置物品循环利用小程序](https://docs.cloudbase.net/practices/ai-cli-mini-program)
365-
- [使用 CodeBuddy IDE + CloudBase 一站式开发卡片翻翻翻游戏](https://mp.weixin.qq.com/s/2EM3RBzdQUCdfld2CglWgg)
366-
- [1小时开发微信小游戏《我的早餐店》](https://cloud.tencent.com/developer/article/2532595)
367-
- [更多教程...](https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/tutorials)
368-
369-
#### 视频
370-
- [云开发CloudBase:用AI开发一款分手厨房小游戏](https://www.bilibili.com/video/BV1v5KAzwEf9/)
371-
- [软件3.0:AI 编程新时代的最佳拍档](https://www.bilibili.com/video/BV15gKdz1E5N/)
372-
- [更多视频...](https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/tutorials)
362+
- [查看所有教程和视频...](https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/tutorials)
373363

374364
### 项目案例
375365

376-
- [五子棋联机游戏](https://github.com/TencentCloudBase/awesome-cloudbase-examples/tree/master/web/gomoku-game)
377-
- [分手厨房联机游戏](https://github.com/TencentCloudBase/awesome-cloudbase-examples/tree/master/web/overcooked-game)
378-
- [电商管理后台](https://github.com/TencentCloudBase/awesome-cloudbase-examples/tree/master/web/ecommerce-management-backend)
379-
- [更多案例...](https://github.com/TencentCloudBase/awesome-cloudbase-examples)
366+
- [查看所有项目案例...](https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/examples)
380367

381368
## 💬 社区
382369

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ CodeBuddy 已内置 CloudBase MCP,无需配置即可使用。
336336

337337
## 🧩 MCP 工具
338338

339-
**39 个工具**覆盖环境管理、数据库、云函数、静态托管、小程序发布等核心功能。
339+
覆盖环境管理、数据库、云函数、静态托管、小程序发布等核心功能。
340340

341341
| 分类 | 工具 | 核心功能 |
342342
|------|------|----------|

doc/components/IDESelector.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const IDES: IDE[] = [
3232
iconSlug: 'cursor',
3333
docUrl: 'https://docs.cursor.com/context/model-context-protocol#configuration-locations',
3434
supportsProjectMCP: true,
35-
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则',
35+
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则到当前项目',
3636
configExample: `{
3737
"mcpServers": {
3838
"cloudbase": {
@@ -55,7 +55,7 @@ const IDES: IDE[] = [
5555
supportsProjectMCP: true,
5656
cliCommand: 'claude mcp add --transport stdio cloudbase --env INTEGRATION_IDE=ClaudeCode -- npx @cloudbase/cloudbase-mcp@latest',
5757
alternativeConfig: 'Alternatively, add this configuration to .mcp.json:',
58-
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则',
58+
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则到当前项目',
5959
configExample: `{
6060
"mcpServers": {
6161
"cloudbase": {
@@ -77,7 +77,7 @@ const IDES: IDE[] = [
7777
docUrl: 'https://www.codebuddy.ai/docs/zh/ide/Config%20MCP',
7878
supportsProjectMCP: true,
7979
alternativeConfig: 'Alternatively, add this configuration to',
80-
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则',
80+
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则到当前项目',
8181
configExample: `{
8282
"mcpServers": {
8383
"cloudbase": {
@@ -100,7 +100,7 @@ const IDES: IDE[] = [
100100
supportsProjectMCP: true,
101101
cliCommand: 'codebuddy mcp add --scope project cloudbase --env INTEGRATION_IDE=CodeBuddyCode -- npx @cloudbase/cloudbase-mcp@latest',
102102
alternativeConfig: 'Alternatively, add this configuration to .mcp.json:',
103-
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则',
103+
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则到当前项目',
104104
configExample: `{
105105
"mcpServers": {
106106
"cloudbase": {
@@ -122,7 +122,7 @@ const IDES: IDE[] = [
122122
iconUrl: 'https://code.visualstudio.com/favicon.ico',
123123
docUrl: 'https://code.visualstudio.com/docs/copilot/chat/mcp-servers',
124124
supportsProjectMCP: true,
125-
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则',
125+
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则到当前项目',
126126
configExample: `{
127127
"servers": {
128128
"cloudbase": {
@@ -220,7 +220,7 @@ const IDES: IDE[] = [
220220
useCommandInsteadOfConfig: true,
221221
installCommand: 'codex mcp add cloudbase --env INTEGRATION_IDE=CodeX -- cloudbase-mcp',
222222
installCommandDocs: '**前置步骤:** 请先全局安装 CloudBase MCP 工具:\n```bash\nnpm i @cloudbase/cloudbase-mcp -g\n```\n\n根据运行系统在终端中运行指令:\n\n**MacOS, Linux, WSL:**\n```bash\ncodex mcp add cloudbase --env INTEGRATION_IDE=CodeX -- cloudbase-mcp\n```\n\n**Windows Powershell:**\n```bash\ncodex mcp add cloudbase --env INTEGRATION_IDE=CodeX -- cmd /c cloudbase-mcp\n```',
223-
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则',
223+
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则到当前项目',
224224
configExample: `{
225225
"mcpServers": {
226226
"cloudbase": {
@@ -316,7 +316,7 @@ const IDES: IDE[] = [
316316
iconUrl: 'https://g.alicdn.com/qbase/qoder/0.0.183/favIcon.svg',
317317
docUrl: 'https://docs.qoder.com/zh/user-guide/chat/model-context-protocol',
318318
supportsProjectMCP: false,
319-
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则',
319+
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则到当前项目',
320320
configExample: `{
321321
"mcpServers": {
322322
"cloudbase": {
@@ -337,7 +337,7 @@ const IDES: IDE[] = [
337337
iconUrl: 'https://antigravity.google/assets/image/antigravity-logo.png',
338338
docUrl: 'https://antigravity.google/docs',
339339
supportsProjectMCP: true,
340-
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则',
340+
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则到当前项目',
341341
configExample: `{
342342
"mcpServers": {
343343
"cloudbase": {
@@ -358,7 +358,7 @@ const IDES: IDE[] = [
358358
iconSlug: 'windsurf',
359359
docUrl: 'https://docs.windsurf.com/windsurf/cascade/memories',
360360
supportsProjectMCP: true,
361-
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则',
361+
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则到当前项目',
362362
configExample: `{
363363
"mcpServers": {
364364
"cloudbase": {
@@ -405,7 +405,7 @@ const IDES: IDE[] = [
405405
useCommandInsteadOfConfig: true,
406406
installCommand: 'npm i -g @cloudbase/cli',
407407
installCommandDocs: '**安装 CloudBase CLI:**\n\n```bash\nnpm i -g @cloudbase/cli\n```\n\n**初始化配置:**\n\n```bash\ntcb ai\n```\n\n配置向导会引导你完成 AI 工具的配置。CloudBase CLI 内置了 MCP 和 AI 开发规则,无需手动配置。\n\n**开始使用:**\n\n```bash\ntcb ai\n```',
408-
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则',
408+
verificationPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则到当前项目',
409409
configExample: '',
410410
},
411411
];
@@ -479,7 +479,7 @@ const translations: Record<string, Record<string, string>> = {
479479
orAddConfig: '将以下配置添加到',
480480
step2Verify: '步骤 2:验证连接',
481481
verifyDescription: '配置完成后,在 AI 对话中输入以下内容验证',
482-
defaultVerifyPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则',
482+
defaultVerifyPrompt: '检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则到当前项目',
483483
cliCommand: 'CLI 命令',
484484
alternativeConfig: '替代配置',
485485
needHelp: '需要帮助?',

doc/components/RelatedResources.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React from 'react';
21
import Link from '@docusaurus/Link';
2+
import React from 'react';
33
import styles from './RelatedResources.module.css';
44

55
interface RelatedResourcesProps {
@@ -12,6 +12,10 @@ export default function RelatedResources({ ideName, ideDocUrl }: RelatedResource
1212
<div className={styles.container}>
1313
<h2 className={styles.title}>相关资源</h2>
1414
<ul className={styles.list}>
15+
<li>
16+
<Link to="/ai/cloudbase-ai-toolkit/tutorials">视频教程</Link>
17+
<span className={styles.description}> - 观看视频教程和实战案例</span>
18+
</li>
1519
<li>
1620
<Link to="/ai/cloudbase-ai-toolkit/development">开发指南</Link>
1721
<span className={styles.description}> - 深入了解开发最佳实践</span>

doc/components/TutorialsGrid.module.css

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,102 @@
2525
gap: 1.25rem;
2626
}
2727

28+
.videoGrid {
29+
display: grid;
30+
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
31+
gap: 1.5rem;
32+
}
33+
34+
.videoCard {
35+
display: flex;
36+
flex-direction: column;
37+
border: 1px solid var(--ifm-color-emphasis-200);
38+
border-radius: 8px;
39+
text-decoration: none;
40+
transition: all 0.2s ease;
41+
background: var(--ifm-background-surface-color);
42+
overflow: hidden;
43+
}
44+
45+
.videoCard:hover {
46+
border-color: var(--ifm-color-primary);
47+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
48+
text-decoration: none;
49+
transform: translateY(-2px);
50+
}
51+
52+
.thumbnailWrapper {
53+
position: relative;
54+
width: 100%;
55+
padding-top: 56.25%; /* 16:9 aspect ratio */
56+
background: var(--ifm-color-emphasis-100);
57+
overflow: hidden;
58+
}
59+
60+
.thumbnail {
61+
position: absolute;
62+
top: 0;
63+
left: 0;
64+
width: 100%;
65+
height: 100%;
66+
object-fit: cover;
67+
transition: transform 0.3s ease;
68+
}
69+
70+
.videoCard:hover .thumbnail {
71+
transform: scale(1.05);
72+
}
73+
74+
.playIcon {
75+
position: absolute;
76+
top: 50%;
77+
left: 50%;
78+
transform: translate(-50%, -50%);
79+
width: 56px;
80+
height: 56px;
81+
background: rgba(0, 0, 0, 0.7);
82+
border-radius: 50%;
83+
display: flex;
84+
align-items: center;
85+
justify-content: center;
86+
color: white;
87+
font-size: 20px;
88+
transition: all 0.3s ease;
89+
pointer-events: none;
90+
border: 2px solid rgba(255, 255, 255, 0.3);
91+
padding-left: 3px; /* Adjust play icon position */
92+
}
93+
94+
.videoCard:hover .playIcon {
95+
background: rgba(0, 0, 0, 0.85);
96+
transform: translate(-50%, -50%) scale(1.15);
97+
border-color: rgba(255, 255, 255, 0.5);
98+
}
99+
100+
.videoContent {
101+
padding: 1rem;
102+
display: flex;
103+
flex-direction: column;
104+
gap: 0.5rem;
105+
}
106+
107+
.videoTitle {
108+
font-size: 0.9375rem;
109+
font-weight: 600;
110+
color: var(--ifm-font-color-base);
111+
line-height: 1.4;
112+
display: -webkit-box;
113+
-webkit-line-clamp: 2;
114+
-webkit-box-orient: vertical;
115+
overflow: hidden;
116+
}
117+
118+
.videoDescription {
119+
font-size: 0.8125rem;
120+
color: var(--ifm-color-emphasis-600);
121+
line-height: 1.4;
122+
}
123+
28124
.card {
29125
display: flex;
30126
flex-direction: column;
@@ -82,17 +178,33 @@
82178
.grid {
83179
grid-template-columns: 1fr;
84180
}
181+
182+
.videoGrid {
183+
grid-template-columns: 1fr;
184+
}
85185

86186
.card {
87187
padding: 0.875rem;
88188
}
189+
190+
.videoContent {
191+
padding: 0.875rem;
192+
}
89193

90194
.title {
91195
font-size: 0.875rem;
92196
}
197+
198+
.videoTitle {
199+
font-size: 0.875rem;
200+
}
93201

94202
.description {
95203
font-size: 0.75rem;
96204
}
205+
206+
.videoDescription {
207+
font-size: 0.75rem;
208+
}
97209
}
98210

0 commit comments

Comments
 (0)