2025-12-14 11:30:22 -08:00
|
|
|
[build]
|
2025-12-14 12:13:20 -08:00
|
|
|
command = "npm ci --include=dev && npx convex deploy --cmd 'npm run build'"
|
2025-12-14 11:30:22 -08:00
|
|
|
publish = "dist"
|
|
|
|
|
|
|
|
|
|
[build.environment]
|
|
|
|
|
NODE_VERSION = "20"
|
|
|
|
|
|
2025-12-14 17:00:46 -08:00
|
|
|
# SPA fallback for client-side routing (must be last)
|
2025-12-14 11:30:22 -08:00
|
|
|
[[redirects]]
|
2025-12-14 17:00:46 -08:00
|
|
|
from = "/*"
|
|
|
|
|
to = "/index.html"
|
2025-12-14 11:30:22 -08:00
|
|
|
status = 200
|
|
|
|
|
|
2025-12-14 17:00:46 -08:00
|
|
|
# Edge functions for dynamic Convex HTTP proxying
|
|
|
|
|
# RSS feeds
|
|
|
|
|
[[edge_functions]]
|
|
|
|
|
path = "/rss.xml"
|
|
|
|
|
function = "rss"
|
2025-12-14 11:30:22 -08:00
|
|
|
|
2025-12-14 17:00:46 -08:00
|
|
|
[[edge_functions]]
|
|
|
|
|
path = "/rss-full.xml"
|
|
|
|
|
function = "rss"
|
2025-12-14 11:30:22 -08:00
|
|
|
|
2025-12-14 17:00:46 -08:00
|
|
|
# Sitemap
|
|
|
|
|
[[edge_functions]]
|
|
|
|
|
path = "/sitemap.xml"
|
|
|
|
|
function = "sitemap"
|
2025-12-14 11:30:22 -08:00
|
|
|
|
2025-12-14 17:00:46 -08:00
|
|
|
# API endpoints
|
|
|
|
|
[[edge_functions]]
|
|
|
|
|
path = "/api/posts"
|
|
|
|
|
function = "api"
|
2025-12-14 11:30:22 -08:00
|
|
|
|
2025-12-14 17:00:46 -08:00
|
|
|
[[edge_functions]]
|
|
|
|
|
path = "/api/post"
|
|
|
|
|
function = "api"
|
2025-12-14 11:30:22 -08:00
|
|
|
|
2025-12-14 17:00:46 -08:00
|
|
|
# Open Graph bot detection (catches all other routes)
|
2025-12-14 11:30:22 -08:00
|
|
|
[[edge_functions]]
|
|
|
|
|
path = "/*"
|
|
|
|
|
function = "botMeta"
|
|
|
|
|
|
|
|
|
|
[context.production.environment]
|
|
|
|
|
NODE_ENV = "production"
|
|
|
|
|
|
|
|
|
|
[context.deploy-preview.environment]
|
|
|
|
|
NODE_ENV = "development"
|
|
|
|
|
|
|
|
|
|
[context.branch-deploy.environment]
|
|
|
|
|
NODE_ENV = "development"
|
|
|
|
|
|