Skip to content

Commit ef86b31

Browse files
author
Minseo Kim
committed
feat: migrate from Notion CMS to local Markdown files & fix build error
1 parent 2eb6aeb commit ef86b31

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

site.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const CONFIG = {
6464
},
6565
},
6666
isProd: process.env.VERCEL_ENV === "production", // distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables)
67-
revalidateTime: 21600 * 7, // revalidate time for [slug], index
67+
6868
}
6969

7070
module.exports = { CONFIG }

src/libs/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export function formatDate(date: any, local: any) {
1+
export function formatDate(date: any, local: string = "en-US") {
22
const d = new Date(date)
33
const options: any = { year: 'numeric', month: 'short', day: 'numeric' }
44
const res = d.toLocaleDateString(local, options)

src/routes/Detail/PostDetail/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ const PostDetail: React.FC<Props> = () => {
9191
<strong>{prevPost.title}</strong>
9292
<span className="meta">
9393
{formatDate(
94-
prevPost?.date?.start_date || prevPost.createdTime
94+
prevPost?.date?.start_date || prevPost.createdTime,
95+
"ko-KR"
9596
)}
9697
</span>
9798
</a>
@@ -107,7 +108,8 @@ const PostDetail: React.FC<Props> = () => {
107108
<strong>{nextPost.title}</strong>
108109
<span className="meta">
109110
{formatDate(
110-
nextPost?.date?.start_date || nextPost.createdTime
111+
nextPost?.date?.start_date || nextPost.createdTime,
112+
"ko-KR"
111113
)}
112114
</span>
113115
</a>

0 commit comments

Comments
 (0)