trevortylerlee / astro-micro

Blog theme for Astro with search and comments built-in. Zero frameworks.
https://astro-micro.vercel.app
MIT License
113 stars 31 forks source link

fix prev/next post order #28

Closed cgranier closed 1 month ago

cgranier commented 1 month ago

Use a filtered and ordered list to pass into the getNextPost and getPreviousPost functions to preserve proper chronological order when navigating between posts.

Closes #26

I noticed that the main blog page would properly order posts by date, but when using the Previous and Next navigation buttons under each post it would revert to the folder order under src/content/blog. The posts variable used in these functions was not using an ordered list of blog posts.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
astro-micro ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 22, 2024 11:59pm
trevortylerlee commented 1 month ago

Thanks!!

cgranier commented 1 month ago

Thanks!!

You're welcome. And thank you for putting this theme together. It was very helpful while moving my blog over to Astro. Let me know if you need any help with other features.