Closed sherwinski closed 4 months ago
Even if you fix that, you'll get an error from npx astro build --verbose
I'm just deleting the default contents in the src/content/blog/
then adding placeholder.md
to it with contents
---
author: jtara1
pubDatetime: 2022-09-23T15:22:00Z
modDatetime: 2023-12-21T09:12:47.400Z
title: placeholder
slug: placeholder
featured: true
draft: false
tags:
- docs
description:
placeholder desc
---
Yeah good point. It would be convenient if getCollection("blog")
could return an empty array of blogSchema, rather than unknown.
Gonna go ahead and close this as @jtara1's suggestion is the best way forward from what I can tell.
Hello and thanks for providing this great theme 👋
Issue
I noticed that the site breaks when there are no published posts under the
blog/
directory. Even though this isn't typically the case, I at least expected the rendering logic fallback to some empty state.Steps to Reproduce
Clone down and run the project:
End the local server, delete all posts under
blog/
directory, and run the project again:The home page gives the following error and stacktrace:
If you're open to it, I'd be happy to open a PR to add some fallback logic to catch this. Thanks and let me know what you think.