From d3ab1f364953c869a299d15ab745c98c102c2db1 Mon Sep 17 00:00:00 2001 From: devwqc <98067115+devwqc@users.noreply.github.com> Date: Wed, 2 Oct 2024 01:42:35 +0900 Subject: [PATCH 1/3] =?UTF-8?q?refactor:=20FormattedDate=20=EB=82=A0?= =?UTF-8?q?=EC=A7=9C=20=ED=98=95=EC=8B=9D=20ko-KR=EB=A1=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FormattedDate.astro | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/FormattedDate.astro b/src/components/FormattedDate.astro index cd196a5..32d2408 100644 --- a/src/components/FormattedDate.astro +++ b/src/components/FormattedDate.astro @@ -6,7 +6,11 @@ type Props = Omit, 'datetime'> & { }; const { datetime, ...props } = Astro.props; -const formattedDate = datetime.toISOString().split('T')[0]; +const formattedDate = datetime.toLocaleDateString('ko-KR', { + year: 'numeric', + month: '2-digit', + day: '2-digit', +}); --- From 5a2728b3a46702e8cbe919112530cc0403e900f1 Mon Sep 17 00:00:00 2001 From: devwqc <98067115+devwqc@users.noreply.github.com> Date: Wed, 2 Oct 2024 01:52:18 +0900 Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20blog=20slug=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EB=A0=88=EC=9D=B4=EC=95=84=EC=9B=83=20?= =?UTF-8?q?=EA=B5=AC=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Markdown.astro | 2 +- src/pages/blog/[...slug].astro | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/components/Markdown.astro b/src/components/Markdown.astro index fbe9f70..1935a17 100644 --- a/src/components/Markdown.astro +++ b/src/components/Markdown.astro @@ -2,6 +2,6 @@ --- -
+
diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro index 75d5145..4a022a8 100644 --- a/src/pages/blog/[...slug].astro +++ b/src/pages/blog/[...slug].astro @@ -21,12 +21,29 @@ const { Content } = await post.render();
-
-

{post.data.title}

- +
+

{post.data.title}

+

+ + 작성일: + + + { + post.data.updatedDate && ( + + 수정일: + + + ) + } +

+
+

방문해 주셔서 감사합니다.

+

오탈자, 잘못된 정보에 대해 말씀해 주시면 감사히 받겠습니다.

+
From fa920f99ed83cb81ceace78bf4d955c0cc42c117 Mon Sep 17 00:00:00 2001 From: devwqc <98067115+devwqc@users.noreply.github.com> Date: Wed, 2 Oct 2024 02:15:56 +0900 Subject: [PATCH 3/3] =?UTF-8?q?refactor:=20blog=20=EB=A6=AC=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EC=95=84=EC=9B=83=20=EA=B5=AC=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/blog/index.astro | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index ce23f34..e2fbaca 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -1,4 +1,5 @@ --- +import FormattedDate from '@/components/FormattedDate.astro'; import PageLayout from '@/layouts/PageLayout.astro'; import { getCollection } from 'astro:content'; @@ -11,12 +12,25 @@ const posts = (await getCollection('blog')).sort(