mirror of
https://github.com/Xevion/utsa-handbook.git
synced 2025-12-06 01:16:46 -06:00
Add author data collection
This commit is contained in:
7
src/content/authors/xevion.md
Normal file
7
src/content/authors/xevion.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
username: "xevion"
|
||||
displayName: "Ryan Walters"
|
||||
discord: ".xevion"
|
||||
github: "xevion"
|
||||
email: "ryan@walters.to"
|
||||
---
|
||||
@@ -1,7 +1,7 @@
|
||||
import { defineCollection, z } from 'astro:content';
|
||||
import { defineCollection, z } from "astro:content";
|
||||
|
||||
const handbook = defineCollection({
|
||||
type: 'content',
|
||||
type: "content",
|
||||
// Type-check frontmatter using a schema
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
@@ -11,5 +11,15 @@ const handbook = defineCollection({
|
||||
lastModified: z.coerce.date().optional(),
|
||||
}),
|
||||
});
|
||||
const authors = defineCollection({
|
||||
type: "data",
|
||||
schema: z.object({
|
||||
username: z.string(),
|
||||
displayName: z.string(),
|
||||
email: z.string().optional(),
|
||||
discord: z.string().optional(),
|
||||
github: z.string().optional(),
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = { handbook };
|
||||
export const collections = { authors, handbook };
|
||||
|
||||
Reference in New Issue
Block a user