feat(seo): improve SEO configuration and enable SSR
- Enable `ssr: true` in `nuxt.config.ts` for server-side rendering of meta tags. - Implement `useSeoMeta` in `events/.vue` with fallback logic for Open Graph and Twitter cards. - Update `content.config.ts` to use `asSeoCollection` for the news collection. - Migrate event markdown frontmatter to use standardized SEO fields.
This commit is contained in:
@@ -17,35 +17,19 @@ keywords:
|
||||
- 刘连升老师
|
||||
- 永中校友会
|
||||
|
||||
# Open Graph / Facebook
|
||||
og:
|
||||
title: "永平中学第 60 届毕业典礼|初中第 67 届毕业典礼"
|
||||
description: "2025 年永平中学毕业典礼隆重举行,包含师长致辞、奖学金颁发、荣休老师欢送,以及学生精彩演出等精彩环节。"
|
||||
image: "https://img.yphsalumni.org/i/2025/11/27/st6hzt.jpg"
|
||||
type: "article"
|
||||
# --- SEO 专用字段 (对应你的 Zod Schema) ---
|
||||
|
||||
# Twitter 卡片
|
||||
twitter:
|
||||
card: "summary_large_image"
|
||||
title: "永平中学第 60 届毕业典礼"
|
||||
description: "永平中学 2025 毕业典礼精彩回顾:致辞、演出、奖学金颁发与荣休教师表扬。"
|
||||
image: "https://img.yphsalumni.org/i/2025/11/27/st6hzt.jpg"
|
||||
# 对应 schema: seoTitle
|
||||
# 如果不填,代码里会默认使用 title
|
||||
seoTitle: "永平中学第 60 届毕业典礼|初中第 67 届毕业典礼"
|
||||
|
||||
# 文章结构化数据(可选,Nuxt SEO module 会自动识别)
|
||||
structuredData:
|
||||
"@type": "NewsArticle"
|
||||
headline: "永平中学第 60 届毕业典礼圆满举行"
|
||||
image: "https://img.yphsalumni.org/i/2025/11/27/st6hzt.jpg"
|
||||
datePublished: "2025-11-15"
|
||||
author:
|
||||
"@type": "Organization"
|
||||
name: "永平中学校友会"
|
||||
publisher:
|
||||
"@type": "Organization"
|
||||
name: "永平中学"
|
||||
logo:
|
||||
"@type": "ImageObject"
|
||||
url: "/logo.png"
|
||||
# 对应 schema: seoDescription
|
||||
# 如果不填,代码里会默认使用 description
|
||||
seoDescription: "2025 年永平中学毕业典礼隆重举行,包含师长致辞、奖学金颁发、荣休老师欢送,以及学生精彩演出等精彩环节。"
|
||||
|
||||
# 对应 schema: ogImage
|
||||
# 只有当你想要分享的图片和封面图不一样时才填,否则代码里会默认用 cover
|
||||
ogImage: "https://img.yphsalumni.org/i/2025/11/27/st6hzt.jpg"
|
||||
---
|
||||
|
||||
# 永平中学高中第 60 届、初中第 67 届毕业典礼圆满举行
|
||||
|
||||
Reference in New Issue
Block a user