feat: custom author avatar support
This commit is contained in:
parent
b103c045e2
commit
047b896ddc
4 changed files with 47 additions and 11 deletions
13
src/data/authors._schema.ts
Normal file
13
src/data/authors._schema.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import {z} from "astro:content";
|
||||
import {siteConfig} from "../config.ts";
|
||||
|
||||
export const authors = ({ image }) => z.object({
|
||||
name: z.string().default(siteConfig.defaultAuthor.name),
|
||||
email: z.string().email().default(siteConfig.defaultAuthor.email),
|
||||
avatar: image().optional(),
|
||||
mcplayerid: z.string().optional(),
|
||||
social: z.object({
|
||||
twitter: z.string().optional(),
|
||||
fediverse: z.string().optional(),
|
||||
}).optional(),
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue