File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const shipfriend: PortfolioItem = {
5151 category : '개인 블로그' ,
5252 links : {
5353 githubUrl : 'https://github.com/shipfriend0516/techblog' ,
54- deployUrl : 'https://shipfriend.vercel.app ' ,
54+ deployUrl : 'https://www. shipfriend.dev ' ,
5555 } ,
5656} ;
5757const preview : PortfolioItem = {
Original file line number Diff line number Diff line change @@ -7,7 +7,10 @@ export const dynamic = 'force-dynamic'; // 캐싱 방지
77export async function GET ( ) {
88 try {
99 await dbConnect ( ) ;
10- const pageUrl = process . env . NEXTAUTH_URL ;
10+ const pageUrl =
11+ process . env . NEXT_PUBLIC_DEPLOYMENT_URL ||
12+ process . env . NEXTAUTH_URL ||
13+ 'https://shipfriend.dev' ;
1114
1215 // 최신 글 1개 가져오기
1316 const latestPost = await Post . findOne ( { } ) . sort ( { date : - 1 } ) . select ( 'slug' ) ;
@@ -23,6 +26,10 @@ export async function GET() {
2326 ) ;
2427 } catch ( error ) {
2528 console . error ( 'Error redirecting to latest post:' , error ) ;
26- return NextResponse . redirect ( new URL ( `${ process . env . NEXTAUTH_URL } /posts` ) ) ;
29+ const pageUrl =
30+ process . env . NEXT_PUBLIC_DEPLOYMENT_URL ||
31+ process . env . NEXTAUTH_URL ||
32+ 'https://shipfriend.dev' ;
33+ return NextResponse . redirect ( new URL ( `${ pageUrl } /posts` ) ) ;
2734 }
2835}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { Post } from '@/app/types/Post';
44interface GetPostDetailResponse {
55 post : Post ;
66}
7- const URL = process . env . NEXT_PUBLIC_URL || 'http://localhost:3000' ;
7+ const URL = process . env . NEXT_PUBLIC_DEPLOYMENT_URL || process . env . NEXT_PUBLIC_URL || 'http://localhost:3000' ;
88
99export const getPostDetail = async (
1010 slug : string
Original file line number Diff line number Diff line change 11import { Post } from '@/app/types/Post' ;
22
33const PostJSONLd = ( { post } : { post : Post } ) => {
4+ const baseUrl =
5+ process . env . NEXT_PUBLIC_DEPLOYMENT_URL ||
6+ process . env . NEXT_PUBLIC_URL ||
7+ 'https://shipfriend.dev' ;
8+
49 return (
510 < script
611 type = "application/ld+json"
@@ -28,7 +33,7 @@ const PostJSONLd = ({ post }: { post: Post }) => {
2833 name : 'ShipFriend TechBlog' ,
2934 logo : {
3035 '@type' : 'ImageObject' ,
31- url : `https://oraciondev.vercel.app /favicon.ico` ,
36+ url : `${ baseUrl } /favicon.ico` ,
3237 } ,
3338 } ,
3439 } ) ,
Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ export const metadata: Metadata = {
2727 openGraph : {
2828 title : 'ShipFriend TechBlog' ,
2929 description : '문제 해결 경험과 개발 지식을 공유하는 개발 블로그입니다.' ,
30- url :
31- process . env . NEXT_PUBLIC_DEPLOYMENT_URL || 'https://shipfriend.vercel.app' ,
30+ url : process . env . NEXT_PUBLIC_DEPLOYMENT_URL || 'https://www.shipfriend.dev' ,
3231 siteName : 'ShipFriend TechBlog' ,
3332 images : [
3433 {
Original file line number Diff line number Diff line change 11import { Resend } from 'resend' ;
22import {
3- getVerificationEmailHTML ,
43 getNewPostEmailHTML ,
54 getUnsubscribeEmailHTML ,
5+ getVerificationEmailHTML ,
66} from './templates' ;
77
88if ( ! process . env . RESEND_API_KEY ) {
@@ -12,7 +12,10 @@ if (!process.env.RESEND_API_KEY) {
1212const resend = new Resend ( process . env . RESEND_API_KEY ) ;
1313
1414const FROM_EMAIL = process . env . EMAIL_FROM || '' ;
15- const BASE_URL = process . env . NEXT_PUBLIC_URL || 'http://localhost:3000' ;
15+ const BASE_URL =
16+ process . env . NEXT_PUBLIC_DEPLOYMENT_URL ||
17+ process . env . NEXT_PUBLIC_URL ||
18+ 'https://shipfriend.dev' ;
1619
1720export async function sendVerificationEmail (
1821 email : string ,
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import path from 'path';
33import { Feed } from 'feed' ;
44
55export async function generateRssFeed ( posts : any [ ] ) {
6- const site_url = process . env . NEXTAUTH_URL || 'http://localhost:3000' ;
6+ const site_url = process . env . NEXT_PUBLIC_DEPLOYMENT_URL || process . env . NEXTAUTH_URL || 'http://localhost:3000' ;
77
88 const feedOptions = {
99 title : 'ShipFriend TechBlog' ,
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export const projects: Project[] = [
2323 description : '개인 개발 블로그' ,
2424 image : '/images/logo/shipfriend-logo.webp' ,
2525 tags : [ 'Next.js' , 'TypeScript' , 'MongoDB' ] ,
26- demoUrl : 'https://shipfriend.vercel.app /' ,
26+ demoUrl : 'https://shipfriend.dev /' ,
2727 githubUrl : 'https://github.com/ShipFriend0516/TechBlog' ,
2828 slug : 'shipfriend' ,
2929 } ,
Original file line number Diff line number Diff line change @@ -43,12 +43,17 @@ export const generateMetadata = async ({
4343 params : { slug : string } ;
4444} ) : Promise < Metadata > => {
4545 const { post } = await getPostDetail ( params . slug ) ;
46+ const baseUrl =
47+ process . env . NEXT_PUBLIC_DEPLOYMENT_URL || 'https://shipfriend.dev' ;
48+ const postUrl = `${ baseUrl } /posts/${ post . slug } ` ;
49+
4650 return {
4751 title : post . title ,
4852 description : post . subTitle || post . content . substring ( 0 , 160 ) ,
4953 openGraph : {
5054 title : post . title ,
5155 description : post . subTitle || post . content . substring ( 0 , 160 ) ,
56+ url : postUrl ,
5257 images : [ post . thumbnailImage || defaultThumbnail ] ,
5358 type : 'article' ,
5459 publishedTime : new Date ( post . createdAt ) . toISOString ( ) ,
Original file line number Diff line number Diff line change 22import { MetadataRoute } from 'next' ;
33
44export default function robots ( ) : MetadataRoute . Robots {
5- const baseURL = process . env . NEXTAUTH_URL || 'http://localhost:3000' ;
5+ const baseURL = process . env . NEXT_PUBLIC_DEPLOYMENT_URL || process . env . NEXTAUTH_URL || 'http://localhost:3000' ;
66 return {
77 rules : {
88 userAgent : '*' ,
You can’t perform that action at this time.
0 commit comments