From d62fbf0920b20ffc6453998e777caefb8be8f21f Mon Sep 17 00:00:00 2001 From: punjitha <132387971+algotyrnt@users.noreply.github.com> Date: Sun, 17 May 2026 16:52:30 +0530 Subject: [PATCH 1/2] Update SEO metadata structure to include author name in site titles --- .env.example | 3 ++- README.md | 2 +- src/app/layout.tsx | 12 ++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.env.example b/.env.example index 93d9110..4e4bbc6 100644 --- a/.env.example +++ b/.env.example @@ -13,7 +13,8 @@ AUTHOR_NAME=Your Full Name TWITTER_HANDLE=yourtwitterhandle EMAIL=your-email@example.com WEBSITE_URL=https://yourwebsite.com -SITE_NAME=Your Name - Your Title +SITE_NAME=Your Site Name +# Note: Page titles will automatically be formatted as "{SITE_NAME} - {AUTHOR_NAME}" SITE_DESCRIPTION=Your professional description here. ABOUT_TEXT=Your about text describing your background and interests. diff --git a/README.md b/README.md index 0355df6..47f857a 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ All content is driven by environment variables — no CMS required. See [`.env.e | `TWITTER_HANDLE` | Twitter/X username (without `@`) for SEO | | `EMAIL` | Contact email in Connect and footer | | `WEBSITE_URL` | Canonical site URL | -| `SITE_NAME` | Site title | +| `SITE_NAME` | Base site name (e.g. brand or domain) | | `SITE_DESCRIPTION` | Meta description | | `ABOUT_TEXT` | About section body text | | `SITE_KEYWORDS` | JSON array of SEO keywords | diff --git a/src/app/layout.tsx b/src/app/layout.tsx index eb1d518..c50276a 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -27,7 +27,7 @@ export const viewport: Viewport = { export const metadata: Metadata = { title: { - default: SITE_NAME, + default: `${SITE_NAME} - ${AUTHOR_NAME}`, template: '%s | ' + SITE_NAME, }, description: SITE_DESCRIPTION, @@ -42,24 +42,24 @@ export const metadata: Metadata = { telephone: false, }, openGraph: { - title: SITE_NAME, + title: `${SITE_NAME} - ${AUTHOR_NAME}`, description: SITE_DESCRIPTION, url: '/', - siteName: SITE_NAME, + siteName: AUTHOR_NAME, type: 'website', images: [ { url: '/opengraph-image', width: 1200, height: 630, - alt: SITE_NAME, + alt: `${SITE_NAME} - ${AUTHOR_NAME}`, }, ], locale: 'en_US', }, twitter: { card: 'summary_large_image', - title: SITE_NAME, + title: `${SITE_NAME} - ${AUTHOR_NAME}`, description: SITE_DESCRIPTION, site: TWITTER_HANDLE ? `@${TWITTER_HANDLE}` : undefined, creator: TWITTER_HANDLE ? `@${TWITTER_HANDLE}` : undefined, @@ -83,7 +83,7 @@ const JSON_LD = JSON.stringify({ { '@type': 'WebSite', '@id': `${WEBSITE_URL}/#website`, - name: SITE_NAME, + name: AUTHOR_NAME, url: WEBSITE_URL, description: SITE_DESCRIPTION, }, From ec68c985b11251bac4e983f43b0abe4b6fa8b59e Mon Sep 17 00:00:00 2001 From: punjitha <132387971+algotyrnt@users.noreply.github.com> Date: Sun, 17 May 2026 17:07:58 +0530 Subject: [PATCH 2/2] Apply code review suggestions --- .env.example | 1 - src/app/layout.tsx | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index 4e4bbc6..5447ba6 100644 --- a/.env.example +++ b/.env.example @@ -14,7 +14,6 @@ TWITTER_HANDLE=yourtwitterhandle EMAIL=your-email@example.com WEBSITE_URL=https://yourwebsite.com SITE_NAME=Your Site Name -# Note: Page titles will automatically be formatted as "{SITE_NAME} - {AUTHOR_NAME}" SITE_DESCRIPTION=Your professional description here. ABOUT_TEXT=Your about text describing your background and interests. diff --git a/src/app/layout.tsx b/src/app/layout.tsx index c50276a..e8ad87d 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -28,7 +28,7 @@ export const viewport: Viewport = { export const metadata: Metadata = { title: { default: `${SITE_NAME} - ${AUTHOR_NAME}`, - template: '%s | ' + SITE_NAME, + template: '%s - ' + SITE_NAME, }, description: SITE_DESCRIPTION, metadataBase: new URL(WEBSITE_URL), @@ -45,7 +45,7 @@ export const metadata: Metadata = { title: `${SITE_NAME} - ${AUTHOR_NAME}`, description: SITE_DESCRIPTION, url: '/', - siteName: AUTHOR_NAME, + siteName: SITE_NAME, type: 'website', images: [ { @@ -83,7 +83,7 @@ const JSON_LD = JSON.stringify({ { '@type': 'WebSite', '@id': `${WEBSITE_URL}/#website`, - name: AUTHOR_NAME, + name: SITE_NAME, url: WEBSITE_URL, description: SITE_DESCRIPTION, },