File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ export const NAV_ITEMS: NavItems = {
55 path : '/' ,
66 title : 'home'
77 } ,
8+ blog : {
9+ path : '/blog' ,
10+ title : 'blog'
11+ } ,
812 about : {
913 path : '/about' ,
1014 title : 'about'
Original file line number Diff line number Diff line change 1+ ---
2+ import DefaultPageLayout from ' $/layouts/default.astro'
3+ import PostPreviewList from ' $/components/PostPreviewList.astro'
4+
5+ let title = ' Blog' ;
6+ let description = ' All the articles posted so far...'
7+
8+ const posts = Astro .fetchContent (' ./blog/*.md' )
9+ ---
10+ <DefaultPageLayout content ={ { title , description }} >
11+ <PostPreviewList posts ={ posts } />
12+ </DefaultPageLayout >
Original file line number Diff line number Diff line change @@ -10,4 +10,16 @@ const posts = Astro.fetchContent('./blog/*.md')
1010---
1111<DefaultPageLayout content ={ { title , description }} showPageHeader ={ false } >
1212 <PostPreviewList posts ={ posts } />
13+ <div class =" page__actions" >
14+ <a class =" action__go-to-blog" href =" /blog" title =" All Posts" >All Posts → </a >
15+ </div >
1316</DefaultPageLayout >
17+
18+ <style >
19+ .page__actions {
20+ @apply flex justify-center md:justify-end py-6
21+ }
22+ .action__go-to-blog {
23+ @apply text-base uppercase text-gray-400 dark:text-gray-600 hover:underline
24+ }
25+ </style >
You can’t perform that action at this time.
0 commit comments