Skip to content

Commit e98e701

Browse files
committed
Added vercel docs cards and added them to all of the relevant docs pages
1 parent 9341e95 commit e98e701

File tree

5 files changed

+48
-11
lines changed

5 files changed

+48
-11
lines changed

docs/guides/examples/vercel-ai-sdk.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebarTitle: "Vercel AI SDK"
44
description: "This example demonstrates how to use the Vercel AI SDK with Trigger.dev."
55
---
66

7+
import VercelDocsCards from "/snippets/vercel-docs-cards.mdx";
8+
79
## Overview
810

911
The [Vercel AI SDK](https://www.npmjs.com/package/ai) is a simple way to use AI models from many different providers, including OpenAI, Microsoft Azure, Google Generative AI, Anthropic, Amazon Bedrock, Groq, Perplexity and [more](https://sdk.vercel.ai/providers/ai-sdk-providers).
@@ -51,3 +53,5 @@ To test this task in the dashboard, you can use the following payload:
5153
"prompt": "What is the meaning of life?"
5254
}
5355
```
56+
57+
<VercelDocsCards />

docs/guides/examples/vercel-sync-env-vars.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebarTitle: "Syncing Vercel env vars"
44
description: "This example demonstrates how to sync environment variables from your Vercel project to Trigger.dev."
55
---
66

7+
import VercelDocsCards from "/snippets/vercel-docs-cards.mdx";
8+
79
## Overview
810

911
This example shows how to automatically sync environment variables from your Vercel project to Trigger.dev.
@@ -26,7 +28,7 @@ export default defineConfig({
2628
syncEnvVars(async (ctx) => {
2729
const environmentMap = {
2830
// Account for the different environment names used by Vercel
29-
prod: "production",
31+
prod: "production",
3032
staging: "preview",
3133
dev: "development",
3234
} as const;
@@ -81,3 +83,5 @@ To run the sync operation, simply run the `deploy` command. You should see some
8183
```bash
8284
npx trigger.dev@latest deploy
8385
```
86+
87+
<VercelDocsCards />

docs/guides/frameworks/nextjs-webhooks.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebarTitle: "Next.js webhooks"
44
description: "Learn how to trigger a task from a webhook in a Next.js app."
55
---
66

7+
import VercelDocsCards from "/snippets/vercel-docs-cards.mdx";
8+
79
## Prerequisites
810

911
- [A Next.js project, set up with Trigger.dev](/guides/frameworks/nextjs)
@@ -135,3 +137,5 @@ If you now go to your [Trigger.dev dashboard](https://cloud.trigger.dev), you sh
135137
</Step>
136138

137139
</Steps>
140+
141+
<VercelDocsCards />

docs/guides/frameworks/nextjs.mdx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import NextjsTroubleshootingButtonSyntax from "/snippets/nextjs-button-syntax.md
1717
import WorkerFailedToStartWhenRunningDevCommand from "/snippets/worker-failed-to-start.mdx";
1818
import AddEnvironmentVariables from "/snippets/add-environment-variables.mdx";
1919
import DeployingYourTask from "/snippets/deplopying-your-task.mdx";
20+
import VercelDocsCards from "/snippets/vercel-docs-cards.mdx";
2021

2122
<Note>This guide can be followed for both App and Pages router as well as Server Actions.</Note>
2223

@@ -254,14 +255,5 @@ Here are the steps to trigger your task in the Next.js App and Pages router and
254255
<NextjsTroubleshootingButtonSyntax/>
255256
<WorkerFailedToStartWhenRunningDevCommand/>
256257

257-
## Additional resources for Next.js
258-
259-
<Card
260-
title="Next.js - triggering tasks using webhooks"
261-
icon="N"
262-
href="/guides/frameworks/nextjs-webhooks"
263-
>
264-
How to create a webhook handler in a Next.js app, and trigger a task from it.
265-
</Card>
266-
258+
<VercelDocsCards />
267259
<UsefulNextSteps />

docs/snippets/vercel-docs-cards.mdx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Learn more about Vercel and Trigger.dev
2+
3+
### Walk-through guides from development to deployment
4+
5+
<CardGroup cols={2}>
6+
<Card title="Next.js - setup guide" icon="N" href="/guides/frameworks/nextjs">
7+
Learn how to setup Trigger.dev with Next.js, using either the pages or app router.
8+
</Card>
9+
10+
<Card
11+
title="Next.js - triggering tasks using webhooks"
12+
icon="N"
13+
href="/guides/frameworks/nextjs-webhooks"
14+
>
15+
Learn how to create a webhook handler for incoming webhooks in a Next.js app, and trigger a task from it.
16+
</Card>
17+
</CardGroup>
18+
19+
### Task examples with code you can copy and paste
20+
21+
<CardGroup cols={2}>
22+
<Card
23+
title="Vercel sync environment variables"
24+
icon="code"
25+
href="/guides/examples/vercel-sync-env-vars"
26+
>
27+
Learn how to automatically sync environment variables from your Vercel projects to Trigger.dev.
28+
</Card>
29+
<Card title="Vercel AI SDK" icon="code" href="/guides/examples/vercel-ai-sdk">
30+
Learn how to use the Vercel AI SDK, which is a simple way to use AI models from different
31+
providers, including OpenAI, Anthropic, Amazon Bedrock, Groq, Perplexity etc.
32+
</Card>
33+
</CardGroup>

0 commit comments

Comments
 (0)