diff options
| -rw-r--r-- | lume/src/blog.jsx | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lume/src/blog.jsx b/lume/src/blog.jsx index 8e3ee43..137bf66 100644 --- a/lume/src/blog.jsx +++ b/lume/src/blog.jsx @@ -15,15 +15,17 @@ export default ({ search }, { date }) => { </p> <ul class="list-disc ml-4 mb-4"> - {search.pages("type=blog", "order date=desc").map((post) => { - const url = post.redirect_to ? post.redirect_to : post.url; - return ( - <li> - <time datetime={date(post.date)} className="font-mono">{post.date.toLocaleDateString("en-US", dateOptions)}</time> -{" "} - <a href={url}>{post.title}</a> - </li> - ); - })} + {search.pages("type=blog", "order date=desc") + .filter((post) => post.index) + .map((post) => { + const url = post.redirect_to ? post.redirect_to : post.url; + return ( + <li> + <time datetime={date(post.date)} className="font-mono">{post.date.toLocaleDateString("en-US", dateOptions)}</time> -{" "} + <a href={url}>{post.title}</a> + </li> + ); + })} </ul> </> ); |
