Skip to content

Commit 88f537b

Browse files
committed
docs: set up vitepress documentation with branding and structure
1 parent 3d5081f commit 88f537b

File tree

14 files changed

+301
-36
lines changed

14 files changed

+301
-36
lines changed

.changeset/dirty-jars-admire.md

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

docs/.vitepress/config.mts

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

docs/config.ts renamed to docs/.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default defineConfig({
66
description: 'A CLI tool to create MCP (Model Context Protocol) applications with ease',
77
base: '/mcp-kit/',
88
head: [
9-
['link', { rel: 'shortcut icon', href: '/mcp-kit/favicons/favicon-64x64.png' }],
9+
['link', { rel: 'shortcut icon', href: '/mcp-kit/favicons/favicon.png' }],
1010
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/mcp-kit/favicons/apple-touch-icon.png' }],
1111
],
1212
themeConfig: {

docs/.vitepress/styles/custom.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
:root {
2+
--vp-home-hero-name-color: transparent;
3+
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #58e1a7, #6b7cff);
4+
--vp-home-hero-image-background-image: linear-gradient(-45deg, #58e1a7 50%, #6b7cff 50%);
5+
--vp-home-hero-image-filter: blur(44px)
6+
}
7+
8+
@media (min-width: 640px) {
9+
:root {
10+
--vp-home-hero-image-filter:blur(56px);
11+
}
12+
}
13+
14+
@media (min-width: 960px) {
15+
:root {
16+
--vp-home-hero-image-filter:blur(68px);
17+
}
18+
}
19+
20+
.VPHero .VPImage {
21+
filter: drop-shadow(-2px 4px 6px #0003);
22+
padding: 18px;
23+
}

docs/.vitepress/theme/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import DefaultTheme from 'vitepress/theme'
2+
import '../styles/custom.css'
3+
4+
export default {
5+
...DefaultTheme,
6+
}

docs/en/guide/getting-started.md

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
---
2+
layout: doc
3+
---
4+
5+
# Getting Started
6+
7+
## Try It Online
8+
9+
You can try VitePress directly in your browser on [StackBlitz](https://vitepress.new).
10+
11+
## Installation
12+
13+
### Prerequisites
14+
15+
- [Node.js](https://nodejs.org/) version 18 or higher.
16+
- Terminal for accessing VitePress via its command line interface (CLI).
17+
- Text Editor with [Markdown](https://en.wikipedia.org/wiki/Markdown) syntax support.
18+
- [VSCode](https://code.visualstudio.com/) is recommended, along with the [official Vue extension](https://marketplace.visualstudio.com/items?itemName=Vue.volar).
19+
20+
VitePress can be used on its own, or be installed into an existing project. In both cases, you can install it with:
21+
22+
::: code-group
23+
24+
```sh [npm]
25+
$ npm add -D vitepress@next
26+
```
27+
28+
```sh [pnpm]
29+
$ pnpm add -D vitepress@next
30+
```
31+
32+
```sh [yarn]
33+
$ yarn add -D vitepress@next vue
34+
```
35+
36+
```sh [bun]
37+
$ bun add -D vitepress@next
38+
```
39+
40+
:::
41+
42+
::: tip NOTE
43+
44+
VitePress is an ESM-only package. Don't use `require()` to import it, and make sure your nearest `package.json` contains `"type": "module"`, or change the file extension of your relevant files like `.vitepress/config.js` to `.mjs`/`.mts`. Refer to [Vite's troubleshooting guide](http://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only) for more details. Also, inside async CJS contexts, you can use `await import('vitepress')` instead.
45+
46+
:::
47+
48+
### Setup Wizard
49+
50+
VitePress ships with a command line setup wizard that will help you scaffold a basic project. After installation, start the wizard by running:
51+
52+
::: code-group
53+
54+
```sh [npm]
55+
$ npx vitepress init
56+
```
57+
58+
```sh [pnpm]
59+
$ pnpm vitepress init
60+
```
61+
62+
```sh [yarn]
63+
$ yarn vitepress init
64+
```
65+
66+
```sh [bun]
67+
$ bun vitepress init
68+
```
69+
70+
[//]: # (:::)
71+
72+
[//]: # ()
73+
[//]: # (You will be greeted with a few simple questions:)
74+
75+
[//]: # ()
76+
[//]: # (<<< @/snippets/init.ansi)
77+
78+
[//]: # ()
79+
[//]: # (::: tip Vue as Peer Dependency)
80+
81+
[//]: # (If you intend to perform customization that uses Vue components or APIs, you should also explicitly install `vue` as a dependency.)
82+
83+
[//]: # (:::)
84+
85+
## File Structure
86+
87+
If you are building a standalone VitePress site, you can scaffold the site in your current directory (`./`). However, if you are installing VitePress in an existing project alongside other source code, it is recommended to scaffold the site in a nested directory (e.g. `./docs`) so that it is separate from the rest of the project.
88+
89+
Assuming you chose to scaffold the VitePress project in `./docs`, the generated file structure should look like this:
90+
91+
```
92+
.
93+
├─ docs
94+
│ ├─ .vitepress
95+
│ │ └─ config.js
96+
│ ├─ api-examples.md
97+
│ ├─ markdown-examples.md
98+
│ └─ index.md
99+
└─ package.json
100+
```
101+
102+
The `docs` directory is considered the **project root** of the VitePress site. The `.vitepress` directory is a reserved location for VitePress' config file, dev server cache, build output, and optional theme customization code.
103+
104+
::: tip
105+
By default, VitePress stores its dev server cache in `.vitepress/cache`, and the production build output in `.vitepress/dist`. If using Git, you should add them to your `.gitignore` file. These locations can also be [configured](../reference/site-config#outdir).
106+
:::
107+
108+
### The Config File
109+
110+
The config file (`.vitepress/config.js`) allows you to customize various aspects of your VitePress site, with the most basic options being the title and description of the site:
111+
112+
```js [.vitepress/config.js]
113+
export default {
114+
// site-level options
115+
title: 'VitePress',
116+
description: 'Just playing around.',
117+
118+
themeConfig: {
119+
// theme-level options
120+
}
121+
}
122+
```
123+
124+
You can also configure the behavior of the theme via the `themeConfig` option. Consult the [Config Reference](../reference/site-config) for full details on all config options.
125+
126+
### Source Files
127+
128+
Markdown files outside the `.vitepress` directory are considered **source files**.
129+
130+
VitePress uses **file-based routing**: each `.md` file is compiled into a corresponding `.html` file with the same path. For example, `index.md` will be compiled into `index.html`, and can be visited at the root path `/` of the resulting VitePress site.
131+
132+
VitePress also provides the ability to generate clean URLs, rewrite paths, and dynamically generate pages. These will be covered in the [Routing Guide](./routing).
133+
134+
## Up and Running
135+
136+
The tool should have also injected the following npm scripts to your `package.json` if you allowed it to do so during the setup process:
137+
138+
```json [package.json]
139+
{
140+
...
141+
"scripts": {
142+
"docs:dev": "vitepress dev docs",
143+
"docs:build": "vitepress build docs",
144+
"docs:preview": "vitepress preview docs"
145+
},
146+
...
147+
}
148+
```
149+
150+
The `docs:dev` script will start a local dev server with instant hot updates. Run it with the following command:
151+
152+
::: code-group
153+
154+
```sh [npm]
155+
$ npm run docs:dev
156+
```
157+
158+
```sh [pnpm]
159+
$ pnpm run docs:dev
160+
```
161+
162+
```sh [yarn]
163+
$ yarn docs:dev
164+
```
165+
166+
```sh [bun]
167+
$ bun run docs:dev
168+
```
169+
170+
:::
171+
172+
Instead of npm scripts, you can also invoke VitePress directly with:
173+
174+
::: code-group
175+
176+
```sh [npm]
177+
$ npx vitepress dev docs
178+
```
179+
180+
```sh [pnpm]
181+
$ pnpm vitepress dev docs
182+
```
183+
184+
```sh [yarn]
185+
$ yarn vitepress dev docs
186+
```
187+
188+
```sh [bun]
189+
$ bun vitepress dev docs
190+
```
191+
192+
:::
193+
194+
More command line usage is documented in the [CLI Reference](../reference/cli).
195+
196+
The dev server should be running at `http://localhost:5173`. Visit the URL in your browser to see your new site in action!
197+
198+
## What's Next?
199+
200+
- To better understand how markdown files are mapped to generated HTML, proceed to the [Routing Guide](./routing).
201+
202+
- To discover more about what you can do on the page, such as writing markdown content or using Vue Components, refer to the "Writing" section of the guide. A great place to start would be to learn about [Markdown Extensions](./markdown).
203+
204+
- To explore the features provided by the default documentation theme, check out the [Default Theme Config Reference](../reference/default-theme-config).
205+
206+
- If you want to further customize the appearance of your site, explore how to either [Extend the Default Theme](./extending-default-theme) or [Build a Custom Theme](./custom-theme).
207+
208+
- Once your documentation site takes shape, make sure to read the [Deployment Guide](./deploy).

docs/guide/introduce.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
layout: doc
3+
---

docs/guide/what-is-mcp.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
layout: doc
3+
---
4+
# What is MCP?
5+
6+
> The Model Context Protocol (MCP) is an open standard that enables seamless integration between LLM applications and external data sources and tools. It allows AI assistants to access and interact with various systems in a standardized way.

docs/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ hero:
55
name: "MCP Kit"
66
text: "Model Context Protocol Toolkit"
77
tagline: A CLI tool to create MCP applications with ease
8+
image:
9+
src: /logo.png
10+
alt: MCP Kit
811
actions:
912
- theme: brand
1013
text: Get Started 👆

docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mcp-kit/docs",
3-
"version": "0.0.0",
3+
"version": "0.0.1",
44
"private": true,
55
"type": "module",
66
"description": "mcp kit docs",
@@ -14,6 +14,6 @@
1414
"license": "MIT",
1515
"dependencies": {},
1616
"devDependencies": {
17-
"vitepress": "^2.0.0-alpha.11"
17+
"vitepress": "^2.0.0-alpha.12"
1818
}
1919
}

0 commit comments

Comments
 (0)