This commit adds the '名人堂' (Hall of Fame) feature and removes the Element Plus dependency. - feat(content): Add Hall of Fame section with a new content collection, homepage component, and detail pages. - refactor(join-us): Rewrite the 'Join Us' form to remove Element Plus, using native elements and Reka UI. The form is temporarily disabled. - feat(ui): Display cover images on News and Events cards. - chore: Integrate Umami for web analytics. - fix: Correct minor text issues, including graduation year in the footer.
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
import { defineContentConfig, defineCollection, z } from "@nuxt/content";
|
|
|
|
export default defineContentConfig({
|
|
collections: {
|
|
// 活动集合
|
|
events: defineCollection({
|
|
type: "page",
|
|
source: "events/*.md",
|
|
schema: z.object({
|
|
title: z.string(),
|
|
subtitle: z.string(),
|
|
date: z.coerce.date(),
|
|
location: z.string(),
|
|
cover: z.string().url(),
|
|
}),
|
|
}),
|
|
// 新闻集合
|
|
news: defineCollection({
|
|
type: "page",
|
|
source: "news/*.md",
|
|
schema: z.object({
|
|
title: z.string(),
|
|
date: z.coerce.date(),
|
|
updated: z.coerce.date().optional(),
|
|
author: z.string(),
|
|
description: z.string(),
|
|
cover: z.string().optional(),
|
|
tags: z.array(z.string()).optional(),
|
|
category: z.enum(["活动", "通知", "招聘", "博客"]).optional(),
|
|
highlight: z.boolean().optional(),
|
|
seoTitle: z.string().optional(),
|
|
seoDescription: z.string().optional(),
|
|
ogImage: z.string().optional(),
|
|
}),
|
|
}),
|
|
// 名人堂
|
|
hallOfFames: defineCollection({
|
|
type: "page",
|
|
source: "hall-of-fames/*md",
|
|
schema: z.object({
|
|
name: z.string(),
|
|
photo: z.string().url(),
|
|
title: z.string(),
|
|
description: z.string(),
|
|
gallery: z.array(z.string()),
|
|
}),
|
|
}),
|
|
},
|
|
});
|