#Problems portfolio YAMLException
8 messages · Page 1 of 1 (latest)
I haven't put it on GitHub yet
Here is the code in config.ts :
import { defineCollection, z } from 'astro:content';
export const collections = {
work: defineCollection({
schema: z.object({
title: z.string(),
description: z.string(),
publishDate: z.coerce.date(),
tags: z.array(z.string()),
img: z.string(),
img_alt: z.string().optional(),
}),
}),
};
Typically this is caused by a syntax error in a Markdown frontmatter
Often with multi-lines attributes, because the syntax can be a bit finicky in YAML (the language used in Markdown frontmatter)
the problem is that everything was working normally, I haven't changed anything since and now I can't launch it
Could you perhaps have ran a formatter or something similar on your Markdown files?
I've been using the Prettier and Eslint extensions since the beginning.