Skip to content

Commit d74783c

Browse files
authored
Moving the docs examples section into guides (#1356)
* Links to guides and examples from the introduction page * Moving examples into guides * update the redirect * Fixed broken links * Fixing redirect * Added another redirect rule * Trigger Mintlify build * Removed redirect
1 parent 3af8ae5 commit d74783c

17 files changed

+65
-105
lines changed

docs/config/config-file.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ And add the following environment variable in your Trigger.dev dashboard on the
498498
PUPPETEER_EXECUTABLE_PATH: "/usr/bin/google-chrome-stable",
499499
```
500500

501-
Follow [this example](/examples/puppeteer) to get setup with Trigger.dev and Puppeteer in your project.
501+
Follow [this example](/guides/examples/puppeteer) to get setup with Trigger.dev and Puppeteer in your project.
502502

503503
#### ffmpeg
504504

@@ -532,7 +532,7 @@ export default defineConfig({
532532

533533
This extension will also add the `FFMPEG_PATH` and `FFPROBE_PATH` to your environment variables, making it easy to use popular ffmpeg libraries like `fluent-ffmpeg`.
534534

535-
Follow [this example](/examples/ffmpeg-video-processing) to get setup with Trigger.dev and FFmpeg in your project.
535+
Follow [this example](/guides/examples/ffmpeg-video-processing) to get setup with Trigger.dev and FFmpeg in your project.
536536

537537
#### esbuild plugins
538538

docs/examples/intro.mdx

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

docs/guides/examples/intro.mdx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: "Introduction"
3+
sidebarTitle: "Introduction"
4+
description: "Learn how to use Trigger.dev with these practical task examples."
5+
---
6+
7+
| Example task | Description |
8+
| :------------------------------------------------------------ | :-------------------------------------------------------------------------- |
9+
| [DALL·E 3 image generation](/guides/examples/dall-e3-generate-image) | Use OpenAI's GPT-4o and DALL·E 3 to generate an image and text. |
10+
| [FFmpeg video processing](/guides/examples/ffmpeg-video-processing) | Use FFmpeg to process a video in various ways and save it to Cloudflare R2. |
11+
| [OpenAI with retrying](/guides/examples/open-ai-with-retrying) | Create a reusable OpenAI task with custom retry options. |
12+
| [PDF to image](/guides/examples/pdf-to-image) | Use `MuPDF` to turn a PDF into images and save them to Cloudflare R2. |
13+
| [React to PDF](/guides/examples/react-pdf) | Use `react-pdf` to generate a PDF and save it to Cloudflare R2. |
14+
| [Puppeteer](/guides/examples/puppeteer) | Use Puppeteer to generate a PDF or scrape a webpage. |
15+
| [Resend email sequence](/guides/examples/resend-email-sequence) | Send a sequence of emails over several days using Resend with Trigger.dev. |
16+
| [Sharp image processing](/guides/examples/sharp-image-processing) | Use Sharp to process an image and save it to Cloudflare R2. |
17+
| [Stripe webhook](/guides/examples/stripe-webhook) | Trigger a task from Stripe webhook events. |
18+
| [Supabase Storage upload](/guides/examples/supabase-storage-upload) | Download a video from a URL and upload it to Supabase Storage using S3. |
19+
| [Vercel AI SDK](/guides/examples/vercel-ai-sdk) | Use Vercel AI SDK to generate text using OpenAI. |

docs/examples/puppeteer.mdx renamed to docs/guides/examples/puppeteer.mdx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import ScrapingWarning from "/snippets/web-scraping-warning.mdx";
1111

1212
There are 3 example tasks to follow on this page:
1313

14-
1. [Basic example](/examples/puppeteer#basic-example)
15-
2. [Generate a PDF from a web page](/examples/puppeteer#generate-a-pdf-from-a-web-page)
16-
3. [Scrape content from a web page](/examples/puppeteer#scrape-content-from-a-web-page)
14+
1. [Basic example](/guides/examples/puppeteer#basic-example)
15+
2. [Generate a PDF from a web page](/guides/examples/puppeteer#generate-a-pdf-from-a-web-page)
16+
3. [Scrape content from a web page](/guides/examples/puppeteer#scrape-content-from-a-web-page)
1717

1818
<ScrapingWarning/>
1919

@@ -143,7 +143,7 @@ There's no payload required for this task so you can just click "Run test" from
143143

144144
### Overview
145145

146-
In this example we use [Puppeteer](https://pptr.dev/) with a [BrowserBase](https://www.browserbase.com/) proxy to scrape the GitHub stars count from the [Trigger.dev](https://trigger.dev) landing page and log it out. See [this list](/examples/puppeteer#proxying) for more proxying services we recommend.
146+
In this example we use [Puppeteer](https://pptr.dev/) with a [BrowserBase](https://www.browserbase.com/) proxy to scrape the GitHub stars count from the [Trigger.dev](https://trigger.dev) landing page and log it out. See [this list](/guides/examples/puppeteer#proxying) for more proxying services we recommend.
147147

148148
<Note>
149149
When web scraping, you MUST use the technique below which uses a proxy with Puppeteer. Direct scraping without using `browserWSEndpoint` is prohibited and will result in account suspension.
@@ -164,12 +164,6 @@ export const puppeteerScrapeWithProxy = task({
164164

165165
const page = await browser.newPage();
166166

167-
// Set up BrowserBase proxy authentication
168-
await page.authenticate({
169-
username: "api",
170-
password: process.env.BROWSERBASE_API_KEY || "",
171-
});
172-
173167
try {
174168
// Navigate to the target website
175169
await page.goto("https://trigger.dev", { waitUntil: "networkidle0" });
File renamed without changes.

docs/introduction.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ We're [open source](https://github.com/triggerdotdev/trigger.dev) and you can ch
2424
<Card title="Writing tasks" icon="wand-magic-sparkles" href="/tasks/overview">
2525
Tasks are the core of Trigger.dev. Learn what they are and how to write them.
2626
</Card>
27+
<Card title="Framework guides" icon="wand-magic-sparkles" href="/guides/frameworks/introduction">
28+
Get started with Trigger.dev in your existing framework.
29+
</Card>
30+
<Card title="Example tasks" icon="wand-magic-sparkles" href="/guides/examples/intro">
31+
Example tasks to get you started.
32+
</Card>
2733
</CardGroup>
2834

2935
## Getting help

docs/mint.json

Lines changed: 33 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
{
22
"$schema": "https://mintlify.com/schema.json",
33
"name": "Trigger.dev",
4-
"openapi": [
5-
"/openapi.yml",
6-
"/v3-openapi.yaml"
7-
],
4+
"openapi": ["/openapi.yml", "/v3-openapi.yaml"],
85
"api": {
96
"playground": {
107
"mode": "simple"
@@ -90,58 +87,42 @@
9087
{
9188
"source": "/trigger-config",
9289
"destination": "/config/config-file"
90+
},
91+
{
92+
"source": "/examples/:slug*",
93+
"destination": "/guides/examples/:slug*"
9394
}
9495
],
9596
"anchors": [
9697
{
97-
"name": "Guides",
98+
"name": "Guides & examples",
9899
"icon": "book",
99100
"url": "guides"
100-
},
101-
{
102-
"name": "Examples",
103-
"icon": "code",
104-
"url": "examples"
105101
}
106102
],
107103
"navigation": [
108104
{
109105
"group": "Getting Started",
110-
"pages": [
111-
"introduction",
112-
"quick-start",
113-
"how-it-works",
114-
"upgrading-beta",
115-
"limits"
116-
]
106+
"pages": ["introduction", "quick-start", "how-it-works", "upgrading-beta", "limits"]
117107
},
118108
{
119109
"group": "Fundamentals",
120110
"pages": [
121111
{
122112
"group": "Tasks",
123-
"pages": [
124-
"tasks/overview",
125-
"tasks/scheduled"
126-
]
113+
"pages": ["tasks/overview", "tasks/scheduled"]
127114
},
128115
"triggering",
129116
"apikeys",
130117
{
131118
"group": "Configuration",
132-
"pages": [
133-
"config/config-file",
134-
"config/extensions/overview"
135-
]
119+
"pages": ["config/config-file", "config/extensions/overview"]
136120
}
137121
]
138122
},
139123
{
140124
"group": "Development",
141-
"pages": [
142-
"cli-dev",
143-
"run-tests"
144-
]
125+
"pages": ["cli-dev", "run-tests"]
145126
},
146127
{
147128
"group": "Deployment",
@@ -151,9 +132,7 @@
151132
"github-actions",
152133
{
153134
"group": "Deployment integrations",
154-
"pages": [
155-
"vercel-integration"
156-
]
135+
"pages": ["vercel-integration"]
157136
}
158137
]
159138
},
@@ -165,13 +144,7 @@
165144
"errors-retrying",
166145
{
167146
"group": "Wait",
168-
"pages": [
169-
"wait",
170-
"wait-for",
171-
"wait-until",
172-
"wait-for-event",
173-
"wait-for-request"
174-
]
147+
"pages": ["wait", "wait-for", "wait-until", "wait-for-event", "wait-for-request"]
175148
},
176149
"queue-concurrency",
177150
"versioning",
@@ -189,10 +162,7 @@
189162
"management/overview",
190163
{
191164
"group": "Tasks API",
192-
"pages": [
193-
"management/tasks/trigger",
194-
"management/tasks/batch-trigger"
195-
]
165+
"pages": ["management/tasks/trigger", "management/tasks/batch-trigger"]
196166
},
197167
{
198168
"group": "Runs API",
@@ -230,9 +200,7 @@
230200
},
231201
{
232202
"group": "Projects API",
233-
"pages": [
234-
"management/projects/runs"
235-
]
203+
"pages": ["management/projects/runs"]
236204
}
237205
]
238206
},
@@ -278,11 +246,7 @@
278246
},
279247
{
280248
"group": "Help",
281-
"pages": [
282-
"community",
283-
"help-slack",
284-
"help-email"
285-
]
249+
"pages": ["community", "help-slack", "help-email"]
286250
},
287251
{
288252
"group": "Frameworks",
@@ -305,38 +269,34 @@
305269
]
306270
},
307271
{
308-
"group": "Dashboard",
272+
"group": "Example tasks",
309273
"pages": [
310-
"guides/dashboard/creating-a-project"
274+
"guides/examples/intro",
275+
"guides/examples/dall-e3-generate-image",
276+
"guides/examples/ffmpeg-video-processing",
277+
"guides/examples/open-ai-with-retrying",
278+
"guides/examples/pdf-to-image",
279+
"guides/examples/puppeteer",
280+
"guides/examples/sharp-image-processing",
281+
"guides/examples/stripe-webhook",
282+
"guides/examples/supabase-storage-upload",
283+
"guides/examples/react-pdf",
284+
"guides/examples/resend-email-sequence",
285+
"guides/examples/vercel-ai-sdk"
311286
]
312287
},
313288
{
314-
"group": "Migrations",
315-
"pages": [
316-
"guides/use-cases/upgrading-from-v2"
317-
]
289+
"group": "Dashboard",
290+
"pages": ["guides/dashboard/creating-a-project"]
318291
},
319292
{
320-
"group": "Examples",
321-
"pages": [
322-
"examples/intro",
323-
"examples/dall-e3-generate-image",
324-
"examples/ffmpeg-video-processing",
325-
"examples/open-ai-with-retrying",
326-
"examples/pdf-to-image",
327-
"examples/puppeteer",
328-
"examples/sharp-image-processing",
329-
"examples/stripe-webhook",
330-
"examples/supabase-storage-upload",
331-
"examples/react-pdf",
332-
"examples/resend-email-sequence",
333-
"examples/vercel-ai-sdk"
334-
]
293+
"group": "Migrations",
294+
"pages": ["guides/use-cases/upgrading-from-v2"]
335295
}
336296
],
337297
"footerSocials": {
338298
"twitter": "https://twitter.com/triggerdotdev",
339299
"github": "https://github.com/triggerdotdev",
340300
"linkedin": "https://www.linkedin.com/company/triggerdotdev"
341301
}
342-
}
302+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<Warning>
2-
**WEB SCRAPING:** When web scraping, you MUST use a proxy to comply with our terms of service. Direct scraping of third-party websites without the site owner's permission using Trigger.dev Cloud is prohibited and will result in account suspension. See [this example](/examples/puppeteer#scrape-content-from-a-web-page) using a proxy.
2+
**WEB SCRAPING:** When web scraping, you MUST use a proxy to comply with our terms of service. Direct scraping of third-party websites without the site owner's permission using Trigger.dev Cloud is prohibited and will result in account suspension. See [this example](/guides/examples/puppeteer#scrape-content-from-a-web-page) using a proxy.
33
</Warning>

0 commit comments

Comments
 (0)