Skip to content

Commit 522ab2e

Browse files
committed
feat: enhance documentation structure and content
- Updated the main documentation page with a new title and description, focusing on Vercord's integration with Discord. - Added detailed installation guides, including environment setup and Discord configuration. - Introduced new pages for LLMs, providing comprehensive information on accessing documentation content and page actions. - Removed the obsolete test.mdx file to streamline documentation. - Cleaned up the source configuration by removing the lastModified plugin, improving code clarity.
1 parent ccf2583 commit 522ab2e

File tree

14 files changed

+327
-33
lines changed

14 files changed

+327
-33
lines changed
Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
---
2-
title: Hello World
3-
description: Your first document
2+
title: Introduction
3+
description: Real-time Vercel deployment notifications for Discord
4+
icon: House
45
---
56

6-
Welcome to the docs! You can start writing documents in `/content/docs`.
7+
# Vercel to Discord
78

8-
## What is Next?
9+
A lightweight integration service that connects Vercel deployments with Discord,
10+
delivering real-time status notifications to your team channels. Enhance your
11+
DevOps workflow with immediate visibility into your deployment pipeline.
912

10-
<Cards>
11-
<Card title="Learn more about Next.js" href="https://nextjs.org/docs" />
12-
<Card title="Learn more about Fumadocs" href="https://fumadocs.dev" />
13-
</Cards>
13+
# Features
14+
15+
- Real-time deployment event notifications
16+
- Support for all Vercel webhook event types
17+
- Rich Discord embeds with status-specific colors and icons
18+
- Direct links to Vercel deployments, projects, and GitHub commits
19+
- Context-rich information including branch, commit, and environment details
20+
- Reliable delivery with retry mechanism for handling rate limits
21+
- Easily extensible for customization
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: Environment
3+
description: How to setup environment variables for Vercord
4+
icon: Settings
5+
---
6+
7+
import { TypeTable } from 'fumadocs-ui/components/type-table';
8+
9+
# Environment Variables
10+
11+
These are the environment variables you need to set at your Vercord instance in
12+
Vercel for it to work
13+
14+
<TypeTable
15+
type={{
16+
WEBHOOK_INTEGRATION_SECRET: {
17+
description: 'The secret for the Vercel webhook integration',
18+
type: 'string',
19+
default: 'your-secret',
20+
required: true
21+
},
22+
DISCORD_WEBHOOK_URL: {
23+
description: 'The URL for the Discord webhook integration',
24+
type: 'string',
25+
default: 'https://discord.com/api/webhooks/<id>/<token>',
26+
required: true
27+
},
28+
DISCORD_WEBHOOK_USERNAME: {
29+
description: 'The username for the Discord webhook',
30+
type: 'string',
31+
default: 'Vercord',
32+
required: false
33+
},
34+
DISCORD_WEBHOOK_AVATAR_URL: {
35+
description: 'The avatar URL for the Discord webhook',
36+
type: 'string',
37+
default: 'https://vercord.dev/logo.jpg',
38+
required: false
39+
}
40+
}}
41+
/>
42+
43+
## Security Considerations
44+
45+
- Store your webhook secret securely with a unique value for each integration
46+
- All incoming webhooks are validated using HMAC-SHA1 signatures
47+
- Webhook payloads are validated against a strict schema to ensure data
48+
integrity
49+
50+
Then just redeploy your Vercord instance and you're done!
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"title": "installation",
3+
"pages": ["requirements", "setup-vercel", "setup-discord", "environment"]
4+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Requirements
3+
description: Requirements for Vercord installation
4+
icon: ListCheck
5+
---
6+
7+
# Prerequisites
8+
9+
To set up Vercord, you will need the following:
10+
11+
1. A Vercel account with project(s).
12+
2. A Discord server with the "Manage Webhooks" permission.
13+
3. Your own Vercord instance:
14+
[Click here to deploy](https://vercel.com/new/clone?repository-url=https://github.com/vercord/vercord)
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Setup Discord
3+
description: How to setup Discord for Vercord
4+
icon: CheckCheck
5+
---
6+
7+
import { Step, Steps } from 'fumadocs-ui/components/steps';
8+
9+
# Setup Discord
10+
11+
<Steps>
12+
<Step>
13+
14+
### Open Discord and Go to Your Server
15+
16+
Open Discord and navigate to the server where you want to receive Vercord
17+
messages.
18+
19+
</Step>
20+
<Step>
21+
22+
### Edit the Target Channel
23+
24+
Right-click the channel you want to use and select **Edit Channel**.
25+
26+
</Step>
27+
<Step>
28+
29+
### Go to Integrations > Webhooks
30+
31+
In the channel settings, go to the **Integrations** tab, then click
32+
**Webhooks**.
33+
34+
</Step>
35+
<Step>
36+
37+
### Create or Select a Webhook
38+
39+
Click **New Webhook** (or select an existing one). Name it (e.g., `Vercord`).
40+
41+
</Step>
42+
<Step>
43+
44+
### Copy the Webhook URL
45+
46+
Copy the **Webhook URL** provided by Discord.
47+
48+
<Callout>Save the webhook URL, you will need it for later.</Callout>
49+
50+
</Step>
51+
</Steps>
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
title: Setup Vercel
3+
description: How to setup Vercel for Vercord
4+
icon: Check
5+
---
6+
7+
import { Step, Steps } from 'fumadocs-ui/components/steps';
8+
9+
# Setup Vercel
10+
11+
<Steps>
12+
<Step>
13+
14+
### Access Vercel Dashboard
15+
16+
Sign in to your account and navigate to the
17+
[Vercel Dashboard](https://vercel.com/dashboard) to manage your projects.
18+
19+
</Step>
20+
21+
<Step>
22+
23+
### Navigate to Project Settings
24+
25+
Click on the **Settings** tab in the navigation menu.
26+
27+
</Step>
28+
29+
<Step>
30+
31+
### Access Webhooks Section
32+
33+
In the left sidebar of your project settings, locate and click on the
34+
**Webhooks** option.
35+
36+
</Step>
37+
38+
<Step>
39+
40+
### Configure New Webhook
41+
42+
Click the **Create Webhook** button and configure your webhook with:
43+
44+
- **URL**: `https://<your-deployed-url>/api/vercel-webhook`
45+
- Choose which events should trigger the webhook.
46+
47+
</Step>
48+
49+
<Step>
50+
51+
### Save Your Secret
52+
53+
Click **Create Webhook** to save your webhook configuration.
54+
55+
<Callout>
56+
Save the secret that Vercel provides you, you will need it for later.
57+
</Callout>
58+
59+
</Step>
60+
</Steps>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: llms-full.txt
3+
description: Get all documentation content in a single text response
4+
icon: FileText
5+
---
6+
7+
# LLMs Full Text
8+
9+
Access all documentation pages combined into one text response at
10+
`/llms-full.txt`.
11+
12+
[Click here](https://vercord.lol/llms-full.txt) to go to the 'llms-full.txt'
13+
page.
14+
15+
## Usage
16+
17+
```
18+
GET /llms-full.txt
19+
```
20+
21+
Returns all pages with this format:
22+
23+
```
24+
# Page Title
25+
URL: /page-url
26+
27+
Page description
28+
29+
Page content...
30+
31+
# Next Page Title
32+
URL: /next-page-url
33+
34+
Next page description
35+
36+
Next page content...
37+
```
38+
39+
## How it works
40+
41+
1. Fetches all documentation pages from the source
42+
2. Processes each page through the `getLLMText` function
43+
3. Combines them with double newline separators
44+
4. Returns as plain text response
45+
46+
The response is cached forever (`revalidate = false`) for performance.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: '.mdx'
3+
description: Get raw page content by adding .mdx to any documentation URL
4+
icon: Code
5+
---
6+
7+
# MDX Endpoint
8+
9+
Append `.mdx` to any documentation page URL to get its raw content.
10+
11+
## Usage
12+
13+
```
14+
/docs → /docs.mdx
15+
/docs/installation/requirements → /docs/installation/requirements.mdx
16+
```
17+
18+
## Response Format
19+
20+
```
21+
# Page Title
22+
URL: /page-url
23+
24+
Page description
25+
26+
Processed page content...
27+
```
28+
29+
## How it works
30+
31+
1. Uses dynamic route `llms.mdx/[[...slug]]/route.ts`
32+
2. Matches the slug to find the corresponding page
33+
3. Processes content through `getLLMText` function
34+
4. Returns formatted text response
35+
5. Returns 404 if page doesn't exist
36+
37+
All routes are statically generated at build time for performance.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"title": "llms",
3+
"pages": ["llms-full.txt", "mdx", "page-actions"]
4+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Page Actions
3+
description: Copy content and open in AI tools from any documentation page
4+
icon: MousePointer
5+
---
6+
7+
# Page Actions
8+
9+
Two buttons on every documentation page: "Copy Markdown" and "Open" dropdown.
10+
11+
## Copy Markdown Button
12+
13+
Copies the page's raw content to clipboard.
14+
15+
1. Fetches content from `[page-url].mdx`
16+
2. Caches the result for subsequent copies
17+
3. Copies to clipboard using Clipboard API
18+
4. Shows check icon when complete
19+
20+
## Open Dropdown
21+
22+
Opens the current page in external tools:
23+
24+
| Option | Action |
25+
| ------------------- | ------------------------------------------ |
26+
| **Open in GitHub** | Links to source file in repository |
27+
| **Open in ChatGPT** | Opens ChatGPT with page content pre-loaded |
28+
| **Open in Claude** | Opens Claude with page content pre-loaded |
29+
| **Open in T3 Chat** | Opens T3 Chat with page content pre-loaded |
30+
31+
AI tools receive a prompt: "Read [page-url].mdx, I want to ask questions about
32+
it."

0 commit comments

Comments
 (0)