Add "Playing It Safe" draft and improve type-checking

- Remove most type assertions and improve types
- Validate wordCount property
- Add "Vore Day" tag
- Add licenses
This commit is contained in:
Bad Manners 2024-08-03 20:33:49 -03:00
parent 17ef8c652c
commit fe908a4989
37 changed files with 1309 additions and 841 deletions

View file

@ -18,6 +18,17 @@ export const getStaticPaths: GetStaticPaths = async () => {
};
const game = Astro.props;
if (!game.data.isDraft) {
if (!game.data.pubDate) {
throw new Error(`Missing "pubDate" for published game ${game.data.title} ("${game.slug}")`);
}
if (!game.data.thumbnail) {
throw new Error(`Missing "thumbnail" for published game ${game.data.title} ("${game.slug}")`);
}
if (game.data.tags.length == 0) {
throw new Error(`Missing "tags" for published game ${game.data.title} ("${game.slug}")`);
}
}
const { Content } = await game.render();
---