Rename domain env var: NEXT_PUBLIC_DOMAIN
This commit is contained in:
parent
9666d7deb2
commit
34bc5855ec
@ -29,7 +29,7 @@ https://photos.sambecker.com
|
|||||||
1. Click [Deploy](https://vercel.com/new/clone?demo-title=Photo+Blog&demo-description=Store+photos+with+original+camera+data&demo-url=https%3A%2F%2Fphotos.sambecker.com&demo-image=https%3A%2F%2Fphotos.sambecker.com%2Ftemplate-image-tight&project-name=Photo+Blog&repository-name=exif-photo-blog&repository-url=https%3A%2F%2Fgithub.com%2Fsambecker%2Fexif-photo-blog&from=templates&skippable-integrations=1&teamCreateStatus=hidden&stores=%5B%7B%22type%22%3A%22postgres%22%7D%2C%7B%22type%22%3A%22blob%22%7D%5D)
|
1. Click [Deploy](https://vercel.com/new/clone?demo-title=Photo+Blog&demo-description=Store+photos+with+original+camera+data&demo-url=https%3A%2F%2Fphotos.sambecker.com&demo-image=https%3A%2F%2Fphotos.sambecker.com%2Ftemplate-image-tight&project-name=Photo+Blog&repository-name=exif-photo-blog&repository-url=https%3A%2F%2Fgithub.com%2Fsambecker%2Fexif-photo-blog&from=templates&skippable-integrations=1&teamCreateStatus=hidden&stores=%5B%7B%22type%22%3A%22postgres%22%7D%2C%7B%22type%22%3A%22blob%22%7D%5D)
|
||||||
2. Add required storage ([Vercel Postgres](https://vercel.com/docs/storage/vercel-postgres/quickstart#create-a-postgres-database) + [Vercel Blob](https://vercel.com/docs/storage/vercel-blob/quickstart#create-a-blob-store)) as part of template installation
|
2. Add required storage ([Vercel Postgres](https://vercel.com/docs/storage/vercel-postgres/quickstart#create-a-postgres-database) + [Vercel Blob](https://vercel.com/docs/storage/vercel-blob/quickstart#create-a-blob-store)) as part of template installation
|
||||||
3. Configure environment variable for production domain in project settings
|
3. Configure environment variable for production domain in project settings
|
||||||
- `NEXT_PUBLIC_SITE_DOMAIN` (e.g., photos.domain.com—used in absolute urls and seen in navigation if no explicit nav title is set)
|
- `NEXT_PUBLIC_DOMAIN` (e.g., photos.domain.com—used in absolute urls and seen in navigation if no explicit nav title is set)
|
||||||
|
|
||||||
### 2. Setup Auth
|
### 2. Setup Auth
|
||||||
|
|
||||||
|
|||||||
@ -295,7 +295,7 @@ export default function AdminAppConfigurationClient({
|
|||||||
>
|
>
|
||||||
Store in environment variable
|
Store in environment variable
|
||||||
(used in explicit share urls, seen in nav if no title is defined):
|
(used in explicit share urls, seen in nav if no title is defined):
|
||||||
{renderEnvVars(['NEXT_PUBLIC_SITE_DOMAIN'])}
|
{renderEnvVars(['NEXT_PUBLIC_DOMAIN'])}
|
||||||
</ChecklistRow>
|
</ChecklistRow>
|
||||||
<ChecklistRow
|
<ChecklistRow
|
||||||
title="Meta title"
|
title="Meta title"
|
||||||
|
|||||||
@ -289,7 +289,7 @@ export default function AdminAppInsightsClient({
|
|||||||
to behave unexpectedly. Domains are stored in
|
to behave unexpectedly. Domains are stored in
|
||||||
{' '}
|
{' '}
|
||||||
<EnvVar
|
<EnvVar
|
||||||
variable="NEXT_PUBLIC_SITE_DOMAIN"
|
variable="NEXT_PUBLIC_DOMAIN"
|
||||||
trailingContent="."
|
trailingContent="."
|
||||||
/>
|
/>
|
||||||
</>}
|
</>}
|
||||||
|
|||||||
@ -71,6 +71,8 @@ export const VERCEL_BYPASS_SECRET = process.env.VERCEL_AUTOMATION_BYPASS_SECRET;
|
|||||||
|
|
||||||
// User-facing domain, potential site title
|
// User-facing domain, potential site title
|
||||||
const SITE_DOMAIN =
|
const SITE_DOMAIN =
|
||||||
|
process.env.NEXT_PUBLIC_DOMAIN ||
|
||||||
|
// Legacy environment variable
|
||||||
process.env.NEXT_PUBLIC_SITE_DOMAIN ||
|
process.env.NEXT_PUBLIC_SITE_DOMAIN ||
|
||||||
VERCEL_PRODUCTION_URL ||
|
VERCEL_PRODUCTION_URL ||
|
||||||
VERCEL_PROJECT_URL ||
|
VERCEL_PROJECT_URL ||
|
||||||
@ -327,7 +329,11 @@ export const APP_CONFIGURATION = {
|
|||||||
Boolean(process.env.ADMIN_PASSWORD)
|
Boolean(process.env.ADMIN_PASSWORD)
|
||||||
),
|
),
|
||||||
// Domain
|
// Domain
|
||||||
hasDomain: Boolean(process.env.NEXT_PUBLIC_SITE_DOMAIN),
|
hasDomain: Boolean(
|
||||||
|
process.env.NEXT_PUBLIC_DOMAIN ||
|
||||||
|
// Legacy environment variable
|
||||||
|
process.env.NEXT_PUBLIC_SITE_DOMAIN,
|
||||||
|
),
|
||||||
// Content
|
// Content
|
||||||
hasNavTitle: Boolean(NAV_TITLE),
|
hasNavTitle: Boolean(NAV_TITLE),
|
||||||
hasNavCaption: Boolean(NAV_CAPTION),
|
hasNavCaption: Boolean(NAV_CAPTION),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user