#Problems portfolio YAMLException

8 messages · Page 1 of 1 (latest)

steep kernel
#

From the looks of the error, seems something with wrong with tag:.
Is your portfolio open source somewhere, I can take a peak around the code.

zealous dirge
#

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(),
}),
}),
};

vapid sable
#

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)

zealous dirge
#

the problem is that everything was working normally, I haven't changed anything since and now I can't launch it

vapid sable
#

Could you perhaps have ran a formatter or something similar on your Markdown files?

zealous dirge
#

I've been using the Prettier and Eslint extensions since the beginning.