Closed cgranier closed 5 months ago
To replicate, create a new post under src/content/blog
:
08-new-post
(to follow the current system of folder names) and then create an index.md
file inside this folder with the following content:---
title: "MARCH 18 2024"
description: "."
date: "2024-03-18"
draft: false
---
MARCH 18 2024
NextPost/PrevPost
will place this new article at the end of the list, even though it will appear listed correctly under the blog
page listing.
Even though the
/blog
page sorts the posts correctly by date, once you navigate to a post theNextPost
andPrevPost
buttons do not function as expected.To fix this, make the following change in
src/pages/blog/[...slug].astro
:should be:
This way, you're reading from a chronological list of posts.