mirror of
https://github.com/waynesutton/markdown-site.git
synced 2026-01-12 04:09:14 +00:00
80 lines
1.7 KiB
TOML
80 lines
1.7 KiB
TOML
[build]
|
|
command = "npm ci --include=dev && npx convex deploy --cmd 'npm run build'"
|
|
publish = "dist"
|
|
|
|
[build.environment]
|
|
NODE_VERSION = "20"
|
|
|
|
# SPA fallback for client-side routing (must be last)
|
|
[[redirects]]
|
|
from = "/*"
|
|
to = "/index.html"
|
|
status = 200
|
|
|
|
# Edge functions for dynamic Convex HTTP proxying
|
|
# RSS feeds
|
|
[[edge_functions]]
|
|
path = "/rss.xml"
|
|
function = "rss"
|
|
|
|
[[edge_functions]]
|
|
path = "/rss-full.xml"
|
|
function = "rss"
|
|
|
|
# Sitemap
|
|
[[edge_functions]]
|
|
path = "/sitemap.xml"
|
|
function = "sitemap"
|
|
|
|
# API endpoints
|
|
[[edge_functions]]
|
|
path = "/api/posts"
|
|
function = "api"
|
|
|
|
[[edge_functions]]
|
|
path = "/api/post"
|
|
function = "api"
|
|
|
|
[[edge_functions]]
|
|
path = "/api/export"
|
|
function = "api"
|
|
|
|
# Geo location API for visitor map
|
|
[[edge_functions]]
|
|
path = "/api/geo"
|
|
function = "geo"
|
|
|
|
# Open Graph bot detection (excludes static files and API routes)
|
|
[[edge_functions]]
|
|
path = "/*"
|
|
function = "botMeta"
|
|
excluded_paths = ["/raw/*", "/api/*", "/**/*.md", "/**/*.xml", "/**/*.txt", "/**/*.yaml", "/**/*.json"]
|
|
|
|
# Security and SEO headers
|
|
[[headers]]
|
|
for = "/*"
|
|
[headers.values]
|
|
X-Frame-Options = "DENY"
|
|
X-Content-Type-Options = "nosniff"
|
|
X-XSS-Protection = "1; mode=block"
|
|
Referrer-Policy = "strict-origin-when-cross-origin"
|
|
Link = "</llms.txt>; rel=\"author\""
|
|
|
|
# Raw markdown files with proper content-type
|
|
[[headers]]
|
|
for = "/raw/*.md"
|
|
[headers.values]
|
|
Content-Type = "text/markdown; charset=utf-8"
|
|
Access-Control-Allow-Origin = "*"
|
|
X-Robots-Tag = "noindex"
|
|
|
|
[context.production.environment]
|
|
NODE_ENV = "production"
|
|
|
|
[context.deploy-preview.environment]
|
|
NODE_ENV = "development"
|
|
|
|
[context.branch-deploy.environment]
|
|
NODE_ENV = "development"
|
|
|