Skip to content

Commit bb16a0f

Browse files
committed
docs: update docs config and dependencies for multi-deployment
1 parent 64ec674 commit bb16a0f

5 files changed

Lines changed: 79 additions & 3 deletions

File tree

docs/.vitepress/config.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1+
import { isUndefined } from 'lodash-es'
12
import { defineConfig } from 'vitepress'
23
import { groupIconMdPlugin, groupIconVitePlugin } from 'vitepress-plugin-group-icons'
34
import llmstxt from 'vitepress-plugin-llms'
45
import pkg from '../../packages/create-mcp-kit/package.json' with { type: 'json' }
56

7+
const isGithubPages = isUndefined(process.env.VERCEL)
8+
69
// https://vitepress.dev/reference/site-config
710
export default defineConfig({
811
title: 'MCP Kit',
912
description: 'A CLI tool to create MCP (Model Context Protocol) applications with ease',
1013
rewrites: {
1114
'en/:rest*': ':rest*',
1215
'en/index.md': 'index.md',
16+
'en/guide/what-is-mcp.md': 'guide/what-is-mcp.md',
17+
'en/guide/what-is-mcp-kit.md': 'guide/what-is-mcp-kit.md',
18+
'en/guide/getting-started.md': 'guide/getting-started.md',
1319
},
14-
base: process.env.VERCEL ? '/' : '/mcp-kit/',
20+
base: isGithubPages ? '/mcp-kit/' : '/',
1521
head: [
1622
['link', { rel: 'shortcut icon', href: '/mcp-kit/favicons/favicon.png' }],
1723
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/mcp-kit/favicons/apple-touch-icon.png' }],
@@ -59,6 +65,9 @@ export default defineConfig({
5965
appId: 'V6CF28P0PS',
6066
apiKey: '692752b7b3c6f794997d8ae22aed79fa',
6167
indexName: 'create-mcp-kit',
68+
searchParameters: {
69+
facetFilters: [`tags:${isGithubPages ? 'gh' : 'vercel'}`],
70+
},
6271
},
6372
},
6473
},

docs/crawlerConfig.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
{
22
"index_name": "create-mcp-kit",
3-
"start_urls": ["https://my-mcp-hub.github.io/mcp-kit/"],
3+
"start_urls": [
4+
{
5+
"url": "https://my-mcp-hub.github.io/mcp-kit/",
6+
"tags": ["gh"]
7+
},
8+
{
9+
"url": "https://mcp-kit-docs.vercel.app/",
10+
"tags": ["vercel"]
11+
}
12+
],
413
"rateLimit": 8,
514
"maxDepth": 10,
615
"selectors": {

docs/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@
1313
"author": "zhensherlock",
1414
"license": "MIT",
1515
"devDependencies": {
16+
"@types/lodash-es": "^4.17.12",
1617
"vitepress": "^2.0.0-alpha.15",
1718
"vitepress-plugin-group-icons": "^1.6.5",
1819
"vitepress-plugin-llms": "^1.9.3"
20+
},
21+
"dependencies": {
22+
"lodash-es": "^4.17.22"
1923
}
2024
}

docs/zh/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ hero:
1111
actions:
1212
- theme: brand
1313
text: 开始使用 👆
14-
link: /guide/getting-started
14+
link: /zh/guide/getting-started
1515
- theme: alt
1616
text: 查看 GitHub
1717
link: https://github.com/my-mcp-hub/mcp-kit

pnpm-lock.yaml

Lines changed: 54 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)