Migrate tags to single file
This commit is contained in:
parent
bb1e533a00
commit
4f42774e83
14 changed files with 326 additions and 335 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue