Skip to content

Commit d2dea2e

Browse files
authored
Merge pull request #8 from camel-ai/dev
add camel severs folder
2 parents a25a826 + 50bfd52 commit d2dea2e

File tree

5 files changed

+41
-19
lines changed

5 files changed

+41
-19
lines changed

app/page.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import Image from "next/image";
44
import { useState } from "react";
5-
import { anthropicServers, officialServers } from "@/public/servers";
5+
import { anthropicServers, officialServers, camelServers } from "@/public/servers";
66
import {
77
Card,
88
CardDescription,
@@ -20,7 +20,8 @@ import { Header } from "@/components/header";
2020

2121
const serversWithSource = [
2222
...anthropicServers.map(server => ({ ...server, source: 'anthropic' as const })),
23-
...officialServers.map(server => ({ ...server, source: 'official' as const }))
23+
...officialServers.map(server => ({ ...server, source: 'official' as const })),
24+
...camelServers.map(server => ({ ...server, source: 'camel' as const }))
2425
];
2526

2627
const allServers = serversWithSource.sort((a, b) =>
@@ -37,7 +38,7 @@ interface Server {
3738
// eslint-disable-next-line @typescript-eslint/no-explicit-any
3839
env?: Record<string, any>;
3940
homepage: string;
40-
source?: 'anthropic' | 'official';
41+
source?: 'anthropic' | 'official' | 'camel';
4142
}
4243

4344
interface ModalProps {

app/robots.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { MetadataRoute } from 'next';
22

3-
// 网站基础URL - 生产环境使用实际域名,开发环境使用localhost
3+
// Base site URL - use actual domain in production, localhost in development
44
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL ||
55
process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` :
66
'https://mcp.camel-ai.org';
@@ -12,9 +12,9 @@ export default function robots(): MetadataRoute.Robots {
1212
userAgent: '*',
1313
allow: '/',
1414
disallow: [
15-
'/api/', // 禁止爬取API路径
16-
'/_next/', // 禁止爬取Next.js内部路径
17-
'/static/images/icons/', // 禁止爬取图标文件
15+
'/api/', // Disallow crawling API paths
16+
'/_next/', // Disallow crawling Next.js internal paths
17+
'/static/images/icons/', // Disallow crawling icon files
1818
],
1919
},
2020
],

app/sitemap.ts

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
import { MetadataRoute } from 'next';
2-
import { anthropicServers, officialServers } from "@/public/servers";
2+
import { anthropicServers, officialServers, camelServers } from "@/public/servers";
33

4-
// 合并所有服务器数据
4+
// Merge all server data
55
const serversWithSource = [
66
...anthropicServers.map(server => ({ ...server, source: 'anthropic' })),
7-
...officialServers.map(server => ({ ...server, source: 'official' }))
7+
...officialServers.map(server => ({ ...server, source: 'official' })),
8+
...camelServers.map(server => ({ ...server, source: 'camel' }))
89
];
910

10-
// 按名称排序
11+
// Sort by name
1112
const allServers = serversWithSource.sort((a, b) =>
1213
a.name.localeCompare(b.name, undefined, { sensitivity: 'base' })
1314
);
1415

15-
// 网站基础URL - 生产环境使用实际域名,开发环境使用localhost
16+
// Base site URL - use actual domain in production, localhost in development
1617
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL ||
1718
process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` :
1819
'https://mcp.camel-ai.org';
1920

20-
// 获取当前日期作为lastModified
21+
// Get current date as lastModified
2122
const currentDate = new Date();
2223

23-
// 生成sitemap
24+
// Generate sitemap
2425
export default function sitemap(): MetadataRoute.Sitemap {
25-
// 创建基础页面的sitemap条目
26+
// Create sitemap entries for base pages
2627
const routes = [
2728
{
2829
url: baseUrl,
@@ -31,15 +32,15 @@ export default function sitemap(): MetadataRoute.Sitemap {
3132
priority: 1.0,
3233
},
3334
{
34-
// 添加服务器列表页
35+
// Add server list page
3536
url: `${baseUrl}/servers`,
3637
lastModified: currentDate,
3738
changeFrequency: 'weekly',
3839
priority: 0.9,
3940
},
4041
] as MetadataRoute.Sitemap;
4142

42-
// 为每个服务器创建单独的sitemap条目
43+
// Create individual sitemap entries for each server
4344
allServers.forEach((server) => {
4445
routes.push({
4546
url: `${baseUrl}/servers/${server.key}`,
@@ -49,7 +50,7 @@ export default function sitemap(): MetadataRoute.Sitemap {
4950
});
5051
});
5152

52-
// 按来源分类的页面
53+
// Pages categorized by source
5354
routes.push(
5455
{
5556
url: `${baseUrl}/servers/source/official`,
@@ -62,6 +63,12 @@ export default function sitemap(): MetadataRoute.Sitemap {
6263
lastModified: currentDate,
6364
changeFrequency: 'weekly',
6465
priority: 0.7,
66+
},
67+
{
68+
url: `${baseUrl}/servers/source/camel`,
69+
lastModified: currentDate,
70+
changeFrequency: 'weekly',
71+
priority: 0.7,
6572
}
6673
);
6774

public/servers/camel.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[
2+
{
3+
"name": "camel-tool",
4+
"key": "camel-tool",
5+
"description": "add description here",
6+
"command": "uvx",
7+
"args": ["add args here"],
8+
"env": {
9+
"add env name here": "add env value here"
10+
},
11+
"homepage": "add homepage here"
12+
}
13+
]

public/servers/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import anthropicServers from "./anthropics.json";
22
import officialServers from "./officials.json";
3+
import camelServers from "./camel.json";
34

4-
export { anthropicServers, officialServers };
5+
export { anthropicServers, officialServers, camelServers };

0 commit comments

Comments
 (0)