Files
yphsalumni.org/nuxt.config.ts
xiaomai c7da09d327 refactor(ui): adopt Nuxt UI prose styles and apply various fixes
Replaces custom `markdown.css` with the default prose styling from Nuxt UI to simplify the styling architecture. This commit also includes several other fixes and improvements:

- fix(members): Correctly
handle empty `graduateYear` strings in the member list.
- fix(layout): Wrap `NuxtPage` in a div to resolve page transition issues.
- feat(seo): Add a meta title to the homepage.
- docs(content): Correct
the title and add an image to an event page.
2025-11-15 13:25:42 +08:00

75 lines
2.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import tailwindcss from "@tailwindcss/vite";
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: "2025-07-15",
devtools: { enabled: true },
modules: [
"@nuxt/ui",
"@nuxt/content",
"@nuxt/image",
"reka-ui/nuxt",
"@nuxtjs/robots",
"@nuxtjs/seo",
"@nuxtjs/sitemap",
],
css: ["~/assets/css/main.css"],
vite: {
plugins: [tailwindcss()],
},
app: {
head: {
titleTemplate: "%s | 永中校友会",
title: "永中校友圈",
script: [
{
src: "/analytics.js",
tagPosition: "head",
},
],
meta: [
// 基础 SEO
{
name: "description",
content: "永平中学校友会官网 - 连接校友,共享资源,传承母校精神。",
},
{
name: "keywords",
content: "永平中学, 校友会, 永平中学校友, 永平校友, 同学会",
},
{ name: "author", content: "永平中学校友会" },
{ name: "viewport", content: "width=device-width, initial-scale=1" },
// Open GraphFacebook/LinkedIn
{ property: "og:title", content: "永平中学校友会" },
{
property: "og:description",
content: "永平中学校友会官网 - 连接校友,共享资源,传承母校精神。",
},
{ property: "og:type", content: "website" },
{ property: "og:url", content: "https://yphsalumni.org" }, // ✅ 换成你网站的真实域名
{
property: "og:image",
content: "https://yphsalumni.org/hero-image-2.jpg?v=2",
}, // ✅ 上传一张封面图
// Twitter Card
{ name: "twitter:card", content: "summary_large_image" },
{ name: "twitter:title", content: "永平中学校友会" },
{
name: "twitter:description",
content: "连接校友,共享资源,传承母校精神。",
},
{
name: "twitter:image",
content: "https://yphsalumni.org/hero-image-2.jpg?v=2",
},
],
},
},
site: {
url: "https://yphsalumni.org",
name: "永中校友会 YPHS Alumni",
},
});