-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
40 lines (35 loc) · 2.34 KB
/
Copy path.env.example
File metadata and controls
40 lines (35 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Next.js (web) — copy to `.env.local`
# https://nextjs.org/docs/app/building-your-application/configuring-environment-variables
# Sanity — project (required; same id as `studio/.env`).
# `next.config.ts` inlines `SANITY_STUDIO_*` into the **client** bundle (Next normally
# only inlines `NEXT_PUBLIC_*`) so Client Components and the server resolve to the same
# project id and dataset — otherwise SSR + CSR produce different Sanity image URLs and
# React reports a hydration mismatch. No `NEXT_PUBLIC_SANITY_PROJECT_ID` needed.
SANITY_STUDIO_PROJECT_ID=
# --- Dataset override (optional; `@repo/sanity-dataset-resolve` / `sanity/sanityEnv.ts`) ---
# Default: no vars — order is inferred (e.g. dev-first locally, prod-first on Vercel production).
#
# Single lever for development / preview deploys: set the SAME variable on the host (Vercel / Netlify /
# Docker env) for **web** and **studio** builds so both point at the same Content Lake dataset.
# - `production` | `development` | `preview` — built-in ordering (see package README).
# - Any other value (e.g. `development`) — try a dataset with that name first, then dev/prod fallbacks.
# SANITY_STUDIO_DEPLOYMENT_TARGET=development
#
# Hard pin (skips auto-selection and `SANITY_STUDIO_DEPLOYMENT_TARGET`).
# `next.config.ts` exposes this to the browser too — set it once.
# SANITY_STUDIO_DATASET=
# Sanity — live preview & Visual Editing (Presentation, Draft Mode, Stega)
# Also used for **Site languages** (`siteLanguageSettings`): with a token, Next reads draft/unpublished
# settings so URLs and fallbacks match Studio before publish. Same token as Studio codegen optional.
SANITY_API_READ_TOKEN=
SANITY_STUDIO_PREVIEW_ORIGIN=
# NEXT_PUBLIC_SANITY_STUDIO_URL=http://localhost:3333
# Sanity webhook secret for `/api/revalidate` (HMAC-SHA256 over the raw body, optionally
# prefixed with `<timestamp>.` per Sanity's signed-webhook spec). Required in production —
# the route refuses requests if this is unset when `NODE_ENV=production`.
# Configure the same secret in Sanity Manage → API → Webhooks (signed delivery) and the
# webhook will send `sanity-webhook-signature: t=<timestamp>,v1=<hex>`.
SANITY_REVALIDATE_SECRET=
# Public site URL — used by `sitemap.ts`, `robots.ts`, OpenGraph metadata.
# Set to the canonical origin (no trailing slash) of the deployed site.
# NEXT_PUBLIC_SITE_URL=https://example.com