diff --git a/README.md b/README.md index f2e24ce8..71517a12 100644 --- a/README.md +++ b/README.md @@ -105,9 +105,10 @@ _⚠️ READ BEFORE PROCEEDING_ Application behavior can be changed by configuring the following environment variables: #### Content -- `NEXT_PUBLIC_SITE_TITLE` (seen in browser tab) -- `NEXT_PUBLIC_SITE_DESCRIPTION` (seen in nav, beneath title) -- `NEXT_PUBLIC_SITE_ABOUT` (seen in grid sidebar—accepts rich formatting tags: ``, ``, ``, ``, ``, `
`) +- `NEXT_PUBLIC_META_TITLE` (seen in browser tab) +- `NEXT_PUBLIC_META_DESCRIPTION` (seen in nav, beneath title) +- `NEXT_PUBLIC_NAV_TITLE` (seen in navigation, defaults to domain when not configured) +- `NEXT_PUBLIC_PAGE_ABOUT` (seen in grid sidebar—accepts rich formatting tags: ``, ``, ``, ``, ``, `
`) #### Performance > ⚠️ Enabling may result in increased project usage. Static optimization [troubleshooting hints](#why-do-production-deployments-fail-when-static-optimization-is-enabled) in FAQ. diff --git a/app/api/route.ts b/app/api/route.ts index 9d46cd8a..fe566c70 100644 --- a/app/api/route.ts +++ b/app/api/route.ts @@ -3,7 +3,7 @@ import { API_PHOTO_REQUEST_LIMIT, formatPhotoForApi } from '@/app/api'; import { BASE_URL, PUBLIC_API_ENABLED, - SITE_TITLE, + META_TITLE, } from '@/app/config'; export const dynamic = 'force-dynamic'; @@ -13,7 +13,7 @@ export async function GET() { const photos = await getPhotosCached({ limit: API_PHOTO_REQUEST_LIMIT }); return Response.json({ meta: { - title: SITE_TITLE, + title: META_TITLE, url: BASE_URL, }, photos: photos.map(formatPhotoForApi), diff --git a/app/layout.tsx b/app/layout.tsx index 7783cb75..7a6bf424 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -5,9 +5,9 @@ import { BASE_URL, DEFAULT_THEME, PRESERVE_ORIGINAL_UPLOADS, - SITE_DESCRIPTION, - SITE_DOMAIN_OR_TITLE, - SITE_TITLE, + META_DESCRIPTION, + NAV_TITLE_OR_DOMAIN, + META_TITLE, } from '@/app/config'; import AppStateProvider from '@/state/AppStateProvider'; import ToasterWithThemes from '@/toast/ToasterWithThemes'; @@ -27,16 +27,16 @@ import RecipeModal from '@/recipe/RecipeModal'; import '../tailwind.css'; export const metadata: Metadata = { - title: SITE_TITLE, - description: SITE_DESCRIPTION, + title: META_TITLE, + description: META_DESCRIPTION, ...BASE_URL && { metadataBase: new URL(BASE_URL) }, openGraph: { - title: SITE_TITLE, - description: SITE_DESCRIPTION, + title: META_TITLE, + description: META_DESCRIPTION, }, twitter: { - title: SITE_TITLE, - description: SITE_DESCRIPTION, + title: META_TITLE, + description: META_DESCRIPTION, }, icons: [{ url: '/favicon.ico', @@ -85,7 +85,7 @@ export default function RootLayout({ 'mx-3 mb-3', 'lg:mx-6 lg:mb-6', )}> -