arunsathiya / portfolio

Arun's blog posts and portfolio of software projects, powered by Notion as a CMS
https://www.arun.blog
2 stars 1 forks source link

Prevent duplicate entries from happening #74

Closed arunsathiya closed 2 months ago

arunsathiya commented 2 months ago

For example, if a post is created with a wrong date, updating the date, creates a new content entry file within the astro project. This breaks, because astro rightly does not allow duplicate slugs. This should be handled at build time.

arunsathiya commented 2 months ago

For example, Day One caused a build failure:

https://vercel.com/arun-s/portfolio/9fLiAiMkk4FWRFiJBzdLctkvk6oQ?filter=errors

image

Cause is, duplicate posts with different dates but same slug:

image
arunsathiya commented 2 months ago

Fixed in 7cc3fdf4326935489032205be6e8b63e02abce60