From 6803d35c36830634baa6240e4d7a65527b102512 Mon Sep 17 00:00:00 2001 From: JeongwooSeo Date: Tue, 20 Jan 2026 23:13:33 +0900 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=EC=82=AC=EC=9D=B4=ED=8A=B8=EB=A7=B5?= =?UTF-8?q?=20=EB=8F=84=EB=A9=94=EC=9D=B8=EC=9D=B4=20vercel=EB=A1=9C=20?= =?UTF-8?q?=EB=90=98=EC=96=B4=EC=9E=88=EB=8D=98=20=EB=AC=B8=EC=A0=9C?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/sitemap.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/sitemap.ts b/app/sitemap.ts index 9331a74..ddd95c0 100644 --- a/app/sitemap.ts +++ b/app/sitemap.ts @@ -3,7 +3,7 @@ import dbConnect from '@/app/lib/dbConnect'; import Post from '@/app/models/Post'; export default async function sitemap(): Promise { - const baseUrl = process.env.NEXTAUTH_URL || 'http://localhost:3000'; + const baseUrl = process.env.NEXT_PUBLIC_DEPLOYMENT_URL || process.env.NEXTAUTH_URL || 'http://localhost:3000'; const staticPages = [ { url: baseUrl, From e3c636ac59e7d629686e73932c2df0ada0aa8125 Mon Sep 17 00:00:00 2001 From: JeongwooSeo Date: Tue, 20 Jan 2026 23:14:30 +0900 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20rss=20=EB=8F=84=EB=A9=94=EC=9D=B8?= =?UTF-8?q?=EC=9D=B4=20vercel.app=20=EC=9D=B4=EC=97=88=EB=8D=98=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/lib/rss.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/rss.ts b/app/lib/rss.ts index b52bfd2..95f392a 100644 --- a/app/lib/rss.ts +++ b/app/lib/rss.ts @@ -3,7 +3,7 @@ import path from 'path'; import { Feed } from 'feed'; export async function generateRssFeed(posts: any[]) { - const site_url = process.env.NEXTAUTH_URL || 'http://localhost:3000'; + const site_url = process.env.NEXT_PUBLIC_DEPLOYMENT_URL || process.env.NEXTAUTH_URL || 'http://localhost:3000'; const feedOptions = { title: 'ShipFriend TechBlog', From 920f3c46c3dd614fc6bb894e7e6aada5392fb73d Mon Sep 17 00:00:00 2001 From: JeongwooSeo Date: Tue, 20 Jan 2026 23:15:33 +0900 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20robots=20=ED=8C=8C=EC=9D=BC=20base?= =?UTF-8?q?=20url=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/robots.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/robots.ts b/app/robots.ts index eb32af9..56cc8de 100644 --- a/app/robots.ts +++ b/app/robots.ts @@ -2,7 +2,7 @@ import { MetadataRoute } from 'next'; export default function robots(): MetadataRoute.Robots { - const baseURL = process.env.NEXTAUTH_URL || 'http://localhost:3000'; + const baseURL = process.env.NEXT_PUBLIC_DEPLOYMENT_URL || process.env.NEXTAUTH_URL || 'http://localhost:3000'; return { rules: { userAgent: '*', From dc6099d24b9931dd6aac017f6c27b3f3e7413bd1 Mon Sep 17 00:00:00 2001 From: JeongwooSeo Date: Tue, 20 Jan 2026 23:15:45 +0900 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20metadata=20baseurl=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/layout.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/layout.tsx b/app/layout.tsx index b0c89a5..6fe61e0 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -27,8 +27,7 @@ export const metadata: Metadata = { openGraph: { title: 'ShipFriend TechBlog', description: '문제 해결 경험과 개발 지식을 공유하는 개발 블로그입니다.', - url: - process.env.NEXT_PUBLIC_DEPLOYMENT_URL || 'https://shipfriend.vercel.app', + url: process.env.NEXT_PUBLIC_DEPLOYMENT_URL || 'https://www.shipfriend.dev', siteName: 'ShipFriend TechBlog', images: [ { From 1bdd8b19e6b9861b30ea927d4126d3e2b6ddd69e Mon Sep 17 00:00:00 2001 From: JeongwooSeo Date: Tue, 20 Jan 2026 23:21:52 +0900 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20seo=EB=A5=BC=20=EC=9C=84=ED=95=9C=20?= =?UTF-8?q?=EB=A9=94=ED=83=80=EB=8D=B0=EC=9D=B4=ED=84=B0=EC=97=90=EC=84=9C?= =?UTF-8?q?=20=EC=9E=98=EB=AA=BB=EB=90=9C=20=EB=8F=84=EB=A9=94=EC=9D=B8=20?= =?UTF-8?q?=EC=B0=B8=EC=A1=B0=20=EB=B6=80=EB=B6=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/portfolio/data.ts | 2 +- app/api/redirect/recent/route.ts | 11 +++++++++-- app/entities/post/api/postAPI.ts | 2 +- app/entities/post/detail/PostJSONLd.tsx | 7 ++++++- app/lib/email/resend.ts | 7 +++++-- app/portfolio/data.ts | 2 +- app/posts/[slug]/page.tsx | 5 +++++ 7 files changed, 28 insertions(+), 8 deletions(-) diff --git a/app/api/portfolio/data.ts b/app/api/portfolio/data.ts index d477e73..51dbf2d 100644 --- a/app/api/portfolio/data.ts +++ b/app/api/portfolio/data.ts @@ -51,7 +51,7 @@ const shipfriend: PortfolioItem = { category: '개인 블로그', links: { githubUrl: 'https://github.com/shipfriend0516/techblog', - deployUrl: 'https://shipfriend.vercel.app', + deployUrl: 'https://www.shipfriend.dev', }, }; const preview: PortfolioItem = { diff --git a/app/api/redirect/recent/route.ts b/app/api/redirect/recent/route.ts index ecf82fb..a625cd6 100644 --- a/app/api/redirect/recent/route.ts +++ b/app/api/redirect/recent/route.ts @@ -7,7 +7,10 @@ export const dynamic = 'force-dynamic'; // 캐싱 방지 export async function GET() { try { await dbConnect(); - const pageUrl = process.env.NEXTAUTH_URL; + const pageUrl = + process.env.NEXT_PUBLIC_DEPLOYMENT_URL || + process.env.NEXTAUTH_URL || + 'https://shipfriend.dev'; // 최신 글 1개 가져오기 const latestPost = await Post.findOne({}).sort({ date: -1 }).select('slug'); @@ -23,6 +26,10 @@ export async function GET() { ); } catch (error) { console.error('Error redirecting to latest post:', error); - return NextResponse.redirect(new URL(`${process.env.NEXTAUTH_URL}/posts`)); + const pageUrl = + process.env.NEXT_PUBLIC_DEPLOYMENT_URL || + process.env.NEXTAUTH_URL || + 'https://shipfriend.dev'; + return NextResponse.redirect(new URL(`${pageUrl}/posts`)); } } diff --git a/app/entities/post/api/postAPI.ts b/app/entities/post/api/postAPI.ts index 949badd..2bfb0f9 100644 --- a/app/entities/post/api/postAPI.ts +++ b/app/entities/post/api/postAPI.ts @@ -4,7 +4,7 @@ import { Post } from '@/app/types/Post'; interface GetPostDetailResponse { post: Post; } -const URL = process.env.NEXT_PUBLIC_URL || 'http://localhost:3000'; +const URL = process.env.NEXT_PUBLIC_DEPLOYMENT_URL || process.env.NEXT_PUBLIC_URL || 'http://localhost:3000'; export const getPostDetail = async ( slug: string diff --git a/app/entities/post/detail/PostJSONLd.tsx b/app/entities/post/detail/PostJSONLd.tsx index d76df8c..21f0ff3 100644 --- a/app/entities/post/detail/PostJSONLd.tsx +++ b/app/entities/post/detail/PostJSONLd.tsx @@ -1,6 +1,11 @@ import { Post } from '@/app/types/Post'; const PostJSONLd = ({ post }: { post: Post }) => { + const baseUrl = + process.env.NEXT_PUBLIC_DEPLOYMENT_URL || + process.env.NEXT_PUBLIC_URL || + 'https://shipfriend.dev'; + return (