File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11---
22title : ' Hello World!'
33description : ' Hello World!'
4- publishedDate : ' 2024-10-01'
4+ pubDate : ' 2024-10-01'
55---
66
77## Hello World!를 작성하는 시점의 나
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const blogCollection = defineCollection({
55 schema : z . object ( {
66 title : z . string ( ) ,
77 description : z . string ( ) ,
8- publishedDate : z . coerce . date ( ) ,
8+ pubDate : z . coerce . date ( ) ,
99 updatedDate : z . coerce . date ( ) . optional ( ) ,
1010 } ) ,
1111} ) ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ const { Content } = await post.render();
2626 <p class =" text-gray-500" >
2727 <span >
2828 작성일:
29- <FormattedDate datetime ={ post .data .publishedDate } />
29+ <FormattedDate datetime ={ post .data .pubDate } />
3030 </span >
3131 {
3232 post .data .updatedDate && (
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import PageLayout from '@/layouts/PageLayout.astro';
44import { getCollection } from ' astro:content' ;
55
66const posts = (await getCollection (' blog' )).sort (
7- (a , b ) => b .data .publishedDate .valueOf () - a .data .publishedDate .valueOf ()
7+ (a , b ) => b .data .pubDate .valueOf () - a .data .pubDate .valueOf ()
88);
99---
1010
@@ -22,7 +22,7 @@ const posts = (await getCollection('blog')).sort(
2222 <p class = " text-gray-500 text-sm" >
2323 <span >
2424 작성일:
25- <FormattedDate datetime = { post .data .publishedDate } />
25+ <FormattedDate datetime = { post .data .pubDate } />
2626 </span >
2727 { post .data .updatedDate && (
2828 <span >
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import PageLayout from '@/layouts/PageLayout.astro';
44import { getCollection } from ' astro:content' ;
55
66const posts = (await getCollection (' blog' )).sort (
7- (a , b ) => b .data .publishedDate .valueOf () - a .data .publishedDate .valueOf ()
7+ (a , b ) => b .data .pubDate .valueOf () - a .data .pubDate .valueOf ()
88);
99---
1010
@@ -22,7 +22,7 @@ const posts = (await getCollection('blog')).sort(
2222 <p class = " text-gray-500 text-sm" >
2323 <span >
2424 작성일:
25- <FormattedDate datetime = { post .data .publishedDate } />
25+ <FormattedDate datetime = { post .data .pubDate } />
2626 </span >
2727 { post .data .updatedDate && (
2828 <span >
You can’t perform that action at this time.
0 commit comments