Migrate tags to single file

This commit is contained in:
Bad Manners 2024-12-15 15:30:12 -03:00
parent bb1e533a00
commit 4f42774e83
No known key found for this signature in database
GPG key ID: 8C88292CCB075609
14 changed files with 326 additions and 335 deletions

View file

@ -1,5 +1,5 @@
import { defineCollection, reference, z } from "astro:content";
import { glob } from "astro/loaders";
import { file, glob } from "astro/loaders";
// Constants
@ -359,11 +359,10 @@ const seriesCollection = defineCollection({
});
const tagCategoriesCollection = defineCollection({
loader: glob({ pattern: "*.{yml,yaml}", base: "./src/data/tag-categories" }),
loader: file("./src/data/tags.yaml"),
schema: z.object({
// Required parameters
name: z.string(),
index: z.number().int(),
category: z.string(),
tags: z
.array(
z.object({