diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..09e7f6a Binary files /dev/null and b/.DS_Store differ diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 90bbc10..ac4ff1f 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -1,4 +1,10 @@ -import { defineConfig } from 'vitepress' +import { defineConfig } from 'vitepress'; + +export const customIcons = { + share: { + svg: '' + } +} export default defineConfig({ title: "OpenMCP", @@ -9,29 +15,53 @@ export default defineConfig({ themeConfig: { // https://vitepress.dev/reference/default-theme-config nav: [ - { text: 'Home', link: '/' }, - { text: 'Examples', link: '/markdown-examples' } - ], - - sidebar: [ + { text: '首页', link: '/' }, + { text: '教程', link: '/plugin-tutorial' }, + { text: 'SDK', link: '/sdk-tutorial' }, { - text: 'Examples', - items: [ - { text: 'Markdown Examples', link: '/markdown-examples' }, - { text: 'Runtime API Examples', link: '/api-examples' } + text: 'Prewiew 0.1.0', items: [ + { + component: 'KNavItem', + props: { + title: '更新日志', + description: '查看项目的更新历史记录', + icon: '/images/icons/monitor.svg', + link: '/preview/changelog' + } + }, + { + component: 'KNavItem', + props: { + title: '参与 OpenMCP', + description: '了解如何参与 OpenMCP 项目的开发和维护', + icon: '/images/icons/group.svg', + link: '/preview/join' + } + }, + { + component: 'KNavItem', + props: { + title: '资源频道', + description: '获取项目相关的资源和信息', + icon: '/images/icons/ai.svg', + link: '/preview/channel' + } + } ] - } + }, ], socialLinks: [ - { icon: 'github', link: 'https://github.com/LSTM-Kirigaya/openmcp-client' } + { icon: 'github', link: 'https://github.com/LSTM-Kirigaya/openmcp-client' }, + { icon: customIcons.share, link: 'https://kirigaya.cn/home' }, ], + footer: { message: '缩短LLM到Agent的最后一公里', copyright: 'OpenMCP All rights reserved' }, - // 添加右侧图片配置 - logo: '/images/openmcp.png', // 确保图片放在public目录下 + // 左上角的 logo + logo: '/images/openmcp.png', } }) diff --git a/.vitepress/theme/Layout.vue b/.vitepress/theme/Layout.vue new file mode 100644 index 0000000..f778585 --- /dev/null +++ b/.vitepress/theme/Layout.vue @@ -0,0 +1,43 @@ + + + + + \ No newline at end of file diff --git a/.vitepress/theme/components/KTab/index.vue b/.vitepress/theme/components/KTab/index.vue index 2b55959..8a6067b 100644 --- a/.vitepress/theme/components/KTab/index.vue +++ b/.vitepress/theme/components/KTab/index.vue @@ -151,7 +151,7 @@ onMounted(() => { position: relative; } -.k-tabs-tag-item { +.k-tabs-tag-item { background-color: var(--vp-button-alt-bg); color: white; border-radius: .5em; @@ -166,11 +166,18 @@ onMounted(() => { transition: background-color 0.3s ease, transform 0.2s ease; } -.k-tabs-tag-item:hover { +@media (min-width: 768px) { + .k-tabs-tag-item { + padding: 6px 16px; + font-size: 1rem; + } +} + +.k-tabs-tag-item:hover { background-color: var(--vp-c-brand-2); } -.k-tabs-tag-item.active-tab { +.k-tabs-tag-item.active-tab { background-color: var(--vp-c-brand-3); } diff --git a/.vitepress/theme/components/bilibli-player/index.vue b/.vitepress/theme/components/bilibli-player/index.vue index 0b8fba0..08c0560 100644 --- a/.vitepress/theme/components/bilibli-player/index.vue +++ b/.vitepress/theme/components/bilibli-player/index.vue @@ -47,8 +47,10 @@ function playVideo() { .bilibili-player-container { position: relative; - width: 72.36vw; - height: 38.26vw; + min-width: 377px; + min-height: 225px; + width: 52.36vw; + height: 28.26vw; aspect-ratio: 16/9; border-radius: .5em; overflow: hidden; diff --git a/.vitepress/theme/components/home/HeroImage.vue b/.vitepress/theme/components/home/HeroImage.vue index b8d3c94..379ee13 100644 --- a/.vitepress/theme/components/home/HeroImage.vue +++ b/.vitepress/theme/components/home/HeroImage.vue @@ -29,8 +29,8 @@ position: absolute; top: 50%; left: 50%; - max-width: 380px; - max-height: 380px; + max-width: 350px; + max-height: 350px; height: 99%; object-fit: contain; transform: translate(-50%, -50%); diff --git a/.vitepress/theme/components/nav-item/index.vue b/.vitepress/theme/components/nav-item/index.vue new file mode 100644 index 0000000..01b10d7 --- /dev/null +++ b/.vitepress/theme/components/nav-item/index.vue @@ -0,0 +1,74 @@ + + + + + \ No newline at end of file diff --git a/.vitepress/theme/index.mts b/.vitepress/theme/index.mts index 2da69bf..bf401d4 100644 --- a/.vitepress/theme/index.mts +++ b/.vitepress/theme/index.mts @@ -2,17 +2,21 @@ import { h } from 'vue'; import type { Theme } from 'vitepress'; import DefaultTheme from 'vitepress/theme'; + +import CustomLayout from './Layout.vue'; + import HeroImage from './components/home/HeroImage.vue'; import TwoSideLayout from './components/home/TwoSideLayout.vue'; import KTab from './components/KTab/index.vue'; import BiliPlayer from './components/bilibli-player/index.vue'; +import KNavItem from './components/nav-item/index.vue'; import './style.css'; export default { extends: DefaultTheme, Layout: () => { - return h(DefaultTheme.Layout, null, { + return h(CustomLayout, null, { 'home-hero-image': () => h(HeroImage) }) }, @@ -20,5 +24,6 @@ export default { app.component('TwoSideLayout', TwoSideLayout); app.component('KTab', KTab); app.component('BiliPlayer', BiliPlayer); + app.component('KNavItem', KNavItem); } } satisfies Theme diff --git a/.vitepress/theme/style.css b/.vitepress/theme/style.css index 5d8fb2c..d0acdf1 100644 --- a/.vitepress/theme/style.css +++ b/.vitepress/theme/style.css @@ -129,6 +129,11 @@ --vp-custom-block-tip-code-bg: var(--vp-c-brand-soft); } +:root { + --vp-home-hero-name-color: transparent; + --vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe, #41d1ff); +} + /** * Component: Algolia * -------------------------------------------------------------------------- */ @@ -143,6 +148,8 @@ .VPHero .image-container img { box-shadow: unset !important; + max-width: 290px !important; + max-height: 290px !important; } iframe { diff --git a/images/icons/ai.svg b/images/icons/ai.svg new file mode 100644 index 0000000..5386a79 --- /dev/null +++ b/images/icons/ai.svg @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/images/icons/group.svg b/images/icons/group.svg new file mode 100644 index 0000000..ab4c8b4 --- /dev/null +++ b/images/icons/group.svg @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/images/icons/monitor.svg b/images/icons/monitor.svg new file mode 100644 index 0000000..f605195 --- /dev/null +++ b/images/icons/monitor.svg @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/images/icons/openmcp-sdk.svg b/images/icons/openmcp-sdk.svg new file mode 100644 index 0000000..60f824f --- /dev/null +++ b/images/icons/openmcp-sdk.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/icons/openmcp.svg b/images/icons/openmcp.svg new file mode 100644 index 0000000..8a81d2f --- /dev/null +++ b/images/icons/openmcp.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/icons/vscode.svg b/images/icons/vscode.svg new file mode 100644 index 0000000..c453e63 --- /dev/null +++ b/images/icons/vscode.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/openmcp.png b/images/openmcp.png index a6e7815..a0647be 100644 Binary files a/images/openmcp.png and b/images/openmcp.png differ diff --git a/index.md b/index.md index 675cf89..6fc8849 100644 --- a/index.md +++ b/index.md @@ -6,33 +6,51 @@ hero: name: "OpenMCP" text: "面向开发者的优雅 MCP 调试器和 SDK" tagline: 缩短从大语言模型到智能体的最后一公里 + image: + src: /images/openmcp.png + alt: VitePress actions: - theme: brand - text: OpenMCP 客户端 + text: OpenMCP 插件 link: /markdown-examples - theme: alt text: openmcp-sdk - link: /api-examples + link: /sdk-tutorial - theme: alt text: GitHub link: https://github.com/LSTM-Kirigaya/openmcp-client +features: + - icon: + src: /images/icons/vscode.svg + height: 48px + alt: 集成调试环境 + title: 集成调试环境 + details: 将检查器与 MCP 客户端功能相结合,实现无缝开发和测试 + - icon: + src: /images/openmcp.png + height: 48px + alt: 提供完整的项目级控制面板 + title: 全面的项目管理 + details: 提供完整的项目级控制面板,实现高效的 MCP 项目监督 + - icon: + src: /images/icons/openmcp-sdk.svg + height: 48px + alt: 提供完整的项目级控制面板 + title: 完整的部署方案 + details: 将测试完成的 agent 通过 openmcp-sdk 部署到您的应用或者服务器上 --- +

-
-
-
-
-

-# OpenMCP 为谁准备? +## OpenMCP 为谁准备?
@@ -48,7 +66,6 @@ hero: ]" image="/images/openmcp.chatbot.png" /> - - - + diff --git a/api-examples.md b/plugin-tutorial/index.md similarity index 100% rename from api-examples.md rename to plugin-tutorial/index.md diff --git a/preview/changelog.md b/preview/changelog.md new file mode 100644 index 0000000..ff97b7c --- /dev/null +++ b/preview/changelog.md @@ -0,0 +1,3 @@ +--- +layout: page +--- \ No newline at end of file diff --git a/preview/channel.md b/preview/channel.md new file mode 100644 index 0000000..ff97b7c --- /dev/null +++ b/preview/channel.md @@ -0,0 +1,3 @@ +--- +layout: page +--- \ No newline at end of file diff --git a/preview/join.md b/preview/join.md new file mode 100644 index 0000000..f225708 --- /dev/null +++ b/preview/join.md @@ -0,0 +1,62 @@ +--- +layout: page +--- + + + + + + + + + + \ No newline at end of file diff --git a/sdk-tutorial/index.md b/sdk-tutorial/index.md new file mode 100644 index 0000000..6bd8bb5 --- /dev/null +++ b/sdk-tutorial/index.md @@ -0,0 +1,49 @@ +--- +outline: deep +--- + +# Runtime API Examples + +This page demonstrates usage of some of the runtime APIs provided by VitePress. + +The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files: + +```md + + +## Results + +### Theme Data +
{{ theme }}
+ +### Page Data +
{{ page }}
+ +### Page Frontmatter +
{{ frontmatter }}
+``` + + + +## Results + +### Theme Data +
{{ theme }}
+ +### Page Data +
{{ page }}
+ +### Page Frontmatter +
{{ frontmatter }}
+ +## More + +Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).