Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 28 additions & 6 deletions pkgs/website/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,27 @@ const DEPLOYMENT_ENV = process.env.DEPLOYMENT_ENV; // 'production' or 'preview'
const isProduction = DEPLOYMENT_ENV === 'production';

// Validate DEPLOYMENT_ENV if set
if (DEPLOYMENT_ENV && DEPLOYMENT_ENV !== 'production' && DEPLOYMENT_ENV !== 'preview') {
throw new Error(`DEPLOYMENT_ENV must be either "production" or "preview", got: "${DEPLOYMENT_ENV}"`);
if (
DEPLOYMENT_ENV &&
DEPLOYMENT_ENV !== 'production' &&
DEPLOYMENT_ENV !== 'preview'
) {
throw new Error(
`DEPLOYMENT_ENV must be either "production" or "preview", got: "${DEPLOYMENT_ENV}"`
);
}

// Require Plausible proxy URL only for production
if (isProduction && !process.env.PLAUSIBLE_PROXY_URL) {
throw new Error('PLAUSIBLE_PROXY_URL environment variable is required for production deployments');
throw new Error(
'PLAUSIBLE_PROXY_URL environment variable is required for production deployments'
);
}

const PLAUSIBLE_PROXY = {
url: process.env.PLAUSIBLE_PROXY_URL || 'https://wispy-pond-c6f8.jumski.workers.dev',
url:
process.env.PLAUSIBLE_PROXY_URL ||
'https://wispy-pond-c6f8.jumski.workers.dev',
eventPath: '/data/event',
scriptPath:
'/assets/script.hash.outbound-links.pageview-props.tagged-events.js',
Expand Down Expand Up @@ -381,7 +391,10 @@ export default defineConfig({
label: 'Context object',
link: '/concepts/context-object/',
},
{ label: 'Naming conventions', link: '/concepts/naming-conventions/' },
{
label: 'Naming conventions',
link: '/concepts/naming-conventions/',
},
],
},
],
Expand Down Expand Up @@ -434,6 +447,12 @@ export default defineConfig({
link: '/tutorials/',
id: 'tutorials',
items: [
{
label: 'RAG Pipeline',
autogenerate: {
directory: 'tutorials/rag/',
},
},
{
label: 'AI Web Scraper',
autogenerate: {
Expand All @@ -452,7 +471,10 @@ export default defineConfig({
{ label: 'DBOS', link: '/comparisons/dbos/' },
{ label: 'Inngest', link: '/comparisons/inngest/' },
{ label: 'Trigger.dev', link: '/comparisons/trigger/' },
{ label: 'Vercel Workflows', link: '/comparisons/vercel-workflows/' },
{
label: 'Vercel Workflows',
link: '/comparisons/vercel-workflows/',
},
],
},
],
Expand Down
5 changes: 5 additions & 0 deletions pkgs/website/src/content/docs/tutorials/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ import { LinkCard, CardGrid } from '@astrojs/starlight/components';
Learn pgflow through hands-on examples. These tutorials guide you through building real workflows while teaching core concepts. Each tutorial is goal-oriented, focusing on practical experience rather than pure explanation.

<CardGrid>
<LinkCard
title="RAG Pipeline"
description="Create parallel chunking RAG Pipeline with pgflow and Postgres"
href="/tutorials/rag/"
/>
<LinkCard
title="Build an AI-Powered Web Scraper"
description="Create a workflow that scrapes webpages, analyzes content with OpenAI, and stores results in Postgres"
Expand Down
Loading