Improve tagging and toki pona support
This commit is contained in:
parent
d4a9dc9dbc
commit
18e98cdb3b
89 changed files with 971 additions and 956 deletions
|
|
@ -10,6 +10,7 @@ export const WEBSITE_LIST = [
|
|||
"twitter",
|
||||
"mastodon",
|
||||
"bluesky",
|
||||
"itaku",
|
||||
] as const;
|
||||
|
||||
const lang = z.enum(["eng", "tok"]).default("eng");
|
||||
|
|
@ -89,8 +90,19 @@ const usersCollection = defineCollection({
|
|||
}),
|
||||
});
|
||||
|
||||
const tagCategoriesCollection = defineCollection({
|
||||
type: "data",
|
||||
schema: z.object({
|
||||
// Required
|
||||
name: z.string(),
|
||||
index: z.number().int(),
|
||||
tags: z.array(z.union([z.string(), z.record(lang, z.string())])),
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = {
|
||||
stories: storiesCollection,
|
||||
games: gamesCollection,
|
||||
users: usersCollection,
|
||||
"tag-categories": tagCategoriesCollection,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue