Skip to content

Commit 9bfd8d6

Browse files
committed
update .env.example
1 parent d3ef262 commit 9bfd8d6

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

.env.example

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ DATABASE_URL=postgresql://${DATABASE_USER}:${DATABASE_PASSWORD}@postgres:5432/${
77
# Used to encrypt JWT tokens
88
PAYLOAD_SECRET=PAYLOAD_SECRET
99

10-
# Used to configure CORS, format links and more. No trailing slash
11-
NEXT_PUBLIC_SERVER_URL=http://localhost:3000
12-
1310
# Secret used to authenticate cron jobs
1411
CRON_SECRET=CRON_SECRET
1512

1613
# Used to validate preview requests
1714
PREVIEW_SECRET=PREVIEW_SECRET
1815

16+
# Hard coded to file, replace in CI environments
17+
# Used to configure CORS, format links and more. No trailing slash
18+
NEXT_PUBLIC_SERVER_URL=http://localhost:3000
1919
# Site config
20-
SITE_NAME=SITE_NAME
20+
NEXT_PUBLIC_SITE_NAME=SITE_NAME
2121

2222
# SES Mail
2323
AWS_SERVICE_REGION=us-east-1
@@ -29,11 +29,11 @@ EMAIL_DEFAULT_FROM=no-reply@mail.com
2929
EMAIL_DEFAULT_REPLY=no-reply@mail.com
3030

3131
# R2
32-
S3_ENDPOINT=
32+
S3_ENDPOINT=http://localhost:3000
3333
S3_BUCKET=test
3434
S3_ACCESS_KEY_ID=S3_ACCESS_KEY_ID
3535
S3_SECRET=S3_SECRET
3636
S3_REGION=auto
3737

3838
# dev & build
39-
APP_CMD=dev | start
39+
APP_CMD=start

src/app/(frontend)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default async function RootLayout({ children }: { children: React.ReactNo
4949
)
5050
}
5151

52-
const SITE_NAME = process.env.SITE_NAME || 'XC2F'
52+
const SITE_NAME = process.env.NEXT_PUBLIC_SITE_NAME || 'XC2F'
5353
export const metadata: Metadata = {
5454
metadataBase: new URL(getServerSideURL()),
5555
title: {

src/plugins/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { Page, Post } from '@/payload-types'
1414
import { getServerSideURL } from '@/utilities/getURL'
1515

1616
const generateTitle: GenerateTitle<Post | Page> = ({ doc }) => {
17-
const SITE_NAME = process.env.SITE_NAME || 'XC2F'
17+
const SITE_NAME = process.env.NEXT_PUBLIC_SITE_NAME || 'XC2F'
1818
return doc?.title ? `${doc.title} | ${SITE_NAME}` : SITE_NAME
1919
}
2020

src/utilities/generateMeta.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const generateMeta = async (args: {
2626

2727
const ogImage = getImageURL(doc?.meta?.image)
2828

29-
const SITE_NAME = process.env.SITE_NAME || 'XC2F'
29+
const SITE_NAME = process.env.NEXT_PUBLIC_SITE_NAME || 'XC2F'
3030
const title = doc?.meta?.title
3131

3232
const metaData = {

src/utilities/mergeOpenGraph.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Metadata } from 'next'
22
import { getServerSideURL } from './getURL'
33

4-
const SITE_NAME = process.env.SITE_NAME || 'XC2F'
4+
const SITE_NAME = process.env.NEXT_PUBLIC_SITE_NAME || 'XC2F'
55
const defaultOpenGraph: Metadata['openGraph'] = {
66
type: 'website',
77
description: 'An open-source website built with Payload and Next.js.',

0 commit comments

Comments
 (0)