@@ -24,28 +24,60 @@ export default defineConfig({
2424 // 站点级选项
2525 lang : 'zh-CN' ,
2626 title : "武汉大学动漫协会-WHUDAYS" , // 网站标题
27- description : "武汉大学动漫协会" , // 网站描述
27+ description : "武汉大学动漫协会(武大漫协 / WHUDAYS)官方历史存档站,记录 1997 年至今的社团活动、部门、成员与刊物。 " , // 网站描述
2828 sitemap : {
2929 hostname : "https://whudays.org/" , // 网站域名
3030 } ,
3131 head : [
32- [ 'meta' , { name : 'keywords' , content : '武汉大学动漫协会, 武大漫协, WHUDAYS, ACGN, 动漫社团, 武大动漫社' } ] ,
32+ [ 'meta' , { name : 'keywords' , content : '武汉大学动漫协会, 武大漫协, WHUDAYS, ACGN, 动漫社团, 武大动漫社, 冬日祭, 春日祭, 樱次元, 夏樱乐团 ' } ] ,
3333 [ 'meta' , { name : 'author' , content : '武汉大学动漫协会' } ] ,
34- [ 'meta' , { name : 'description' , content : '武汉大学动漫协会官方网站,记录社团历史与活动,快来看看吧(!)\\^o^/ ' } ] ,
34+ [ 'meta' , { name : 'description' , content : '武汉大学动漫协会(武大漫协 / WHUDAYS)官方历史存档站,记录 1997 年至今的社团活动、部门、成员与刊物。 ' } ] ,
3535
3636 // Open Graph Protocol
3737 [ 'meta' , { property : 'og:title' , content : '武汉大学动漫协会-WHUDAYS' } ] ,
38- [ 'meta' , { property : 'og:description' , content : '武汉大学动漫协会官方网站,记录社团历史与活动,快来看看吧(!)\\^o^/ ' } ] ,
38+ [ 'meta' , { property : 'og:description' , content : '武汉大学动漫协会(武大漫协 / WHUDAYS)官方历史存档站,记录 1997 年至今的社团活动、部门、成员与刊物。 ' } ] ,
3939 [ 'meta' , { property : 'og:image' , content : '/WHUDAYS.png' } ] ,
40- [ 'meta' , { property : 'og:url' , content : 'https://whudays.org/' } ] ,
4140
4241 // Google Analytics
4342 [ 'script' , { async : '' , src : 'https://www.googletagmanager.com/gtag/js?id=G-LQLQ2CEQ64' } ] ,
4443 [ 'script' , { } , "window.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', 'G-LQLQ2CEQ64');" ] ,
4544
4645 [ 'link' , { rel : 'icon' , href : '/favicon.ico' } ] ,
46+
47+ // 结构化数据:Organization(帮助搜索 / AI 引擎建立社团实体认知)
48+ [ 'script' , { type : 'application/ld+json' } , JSON . stringify ( {
49+ "@context" : "https://schema.org" ,
50+ "@type" : "Organization" ,
51+ "name" : "武汉大学动漫协会" ,
52+ "alternateName" : [ "武大漫协" , "WHUDAYS" ] ,
53+ "url" : "https://whudays.org/" ,
54+ "logo" : "https://whudays.org/WHUDAYS.png" ,
55+ "foundingDate" : "1997" ,
56+ "parentOrganization" : {
57+ "@type" : "CollegeOrUniversity" ,
58+ "name" : "武汉大学" ,
59+ "alternateName" : "Wuhan University" ,
60+ "url" : "https://www.whu.edu.cn/"
61+ } ,
62+ "sameAs" : [
63+ "https://github.com/WHUDAYS" ,
64+ "https://space.bilibili.com/20942465"
65+ ]
66+ } ) ] ,
4767 ] ,
4868
69+ // 按页面注入 canonical / og:url,统一主域为 whudays.org
70+ transformHead ( { pageData } ) {
71+ const path = pageData . relativePath
72+ . replace ( / i n d e x \. m d $ / , '' )
73+ . replace ( / \. m d $ / , '' )
74+ const url = `https://whudays.org/${ path } `
75+ return [
76+ [ 'link' , { rel : 'canonical' , href : url } ] ,
77+ [ 'meta' , { property : 'og:url' , content : url } ] ,
78+ ]
79+ } ,
80+
4981 themeConfig : {
5082 // 主题级选项
5183 nav : [
0 commit comments