Open roblevintennis opened 2 years ago
I noticed a similar thing for Published at
--for example my vanilla Sanity CMS is allowing me to leave this blank:
And then you may get:
UPDATE: I think if we just make it required in the schema it'll at least, ahem, require it from the CMS: https://www.sanity.io/docs/datetime-type#required()-317a51883c16
Added in 696ccd154372f0e9a66c929db323a122f794fce5
Tested:
e341fcb also fixes: https://github.com/littlesticks/astro-sanity-minimal-starter/issues/14
When I played in the GROQ playground it seems that "it likes" the ellipsis to be at the beginning. These examples on their docs site do that though I didn't find it mentioned that it's a requirement but I guess so.
Note that we're getting some author data:
I took liberty to add the other author properties since it's now coming back.
This fixes an issues I encountered first stab at getting up and running:
null
is working fine as the fallback there. Also, I noticed that everywhere else in the code we're using conditional rendering with{post.mainImage &&
... so this feels pretty consistent with that ;-)publishedDate
and validation required