File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ import type { CollectionEntry } from ' astro:content' ;
3+ import { formatDate } from ' @/lib/utils' ;
4+ import { render } from ' astro:content' ;
5+ interface Props {
6+ entry: CollectionEntry <' posts' >;
7+ }
8+
9+ const { entry } = Astro .props ;
10+ const { remarkPluginFrontmatter } = await render (entry );
11+ ---
12+
13+ <li class =" py-2" >
14+ <div class =" flex gap-5" >
15+ <div class =" relative min-w-22 shrink-0" >
16+ <span class =" text-muted-foreground text-sm" >{ formatDate (entry .data .date )} </span >
17+ </div >
18+ <a href ={ ` /writing/${entry .id }/ ` } class =" flex flex-col gap-3" >
19+ <div class =" flex flex-col" >
20+ <span class =" text-headings font-medium" >{ entry .data .title } </span >
21+ <span class =" text-muted-foreground" >{ remarkPluginFrontmatter .minutesRead } </span >
22+ </div >
23+ </a >
24+ </div >
25+ </li >
You can’t perform that action at this time.
0 commit comments