-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
77 lines (72 loc) · 3.53 KB
/
nuxt.config.ts
File metadata and controls
77 lines (72 loc) · 3.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// nuxt.config.ts
export default defineNuxtConfig({
// Nuxt 4 的兼容性日期设定,确保你使用最新的内部机制
compatibilityDate: '2024-04-03',
devtools: { enabled: true },
modules: ['@nuxt/ui', '@nuxtjs/supabase', '@vercel/speed-insights/nuxt', '@vercel/analytics/nuxt'],
css: ['~/assets/css/main.css'],
supabase: {
// 預設情況下,這個模組會強制所有頁面都要登入才能看。
// 我們是公開的賽事網站,所以必須把 redirect 關掉。
redirect: false
},
vue: {
compilerOptions: {
// Treat 'SpeedInsights' as a custom element so Vue stops looking for a component
isCustomElement: (tag) => tag === 'SpeedInsights'
}
},
app: {
head: {
htmlAttrs: {
lang: 'zh-TW' // 根据你的 JSON-LD 地址,设定为繁体中文
},
title: '林间小镇 ForestWork',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: 'description', content: '林间小镇是一个成立于2019年,有来自不同国家的热血玩家组成的社群。这里有好喝的玫瑰茶 (*^▽^*)' },
{ name: 'author', content: 'EaglePB2' },
{ name: 'theme-color', content: '#4C7766' },
{ name: 'keywords', content: '林间, 林间小镇, ForestWork' },
// Open Graph 标签 (给 Facebook/Discord 预览用的)
{ property: 'og:type', content: 'website' },
{ property: 'og:title', content: '林间小镇 ForestWork' },
{ property: 'og:url', content: 'https://forestwork.vercel.app/' },
{ property: 'og:image', content: 'https://og-image.xyz/og/Forestwork/A%20tournament%20result%20website/forestwork.team/https/menlo/virtualshapes/4c7766/data.png' },
{ property: 'og:description', content: '林间小镇是一个成立于2019年,有来自不同国家的热血玩家组成的社群。这里有好喝的玫瑰茶 (*^▽^*)' },
// Twitter 标签
{ name: 'twitter:card', content: 'summary' },
{ name: 'twitter:title', content: '林间小镇 ForestWork' },
{ name: 'twitter:site', content: '@TeamForestWork' },
{ name: 'twitter:description', content: '林间小镇是一个成立于2019年,有来自不同国家的热血玩家组成的社群。这里有好喝的玫瑰茶 (*^▽^*)' },
{ name: 'twitter:image', content: 'https://og-image.xyz/og/Forestwork/A%20tournament%20result%20website/forestwork.team/https/menlo/virtualshapes/4c7766/data.png' },
{ name: 'twitter:image:alt', content: 'ForestWork Logo' }
],
link: [
{ rel: 'icon', href: '/favicon.ico', sizes: 'any' },
{ rel: 'icon', href: '/android-chrome-512x512.png', type: 'image/png' }, // 现代浏览器优先抓取这个
{ rel: 'apple-touch-icon', href: '/apple-touch-icon.png' }, // iOS 看到这个就够了
{ rel: 'manifest', href: '/site.webmanifest' }
],
script: [
// 结构化数据 (JSON-LD),这是好品味的 SEO
{
type: 'application/ld+json',
innerHTML: JSON.stringify({
"@context": "http://schema.org/",
"@type": "Organization",
"name": "林间小镇",
"logo": "https://forestwork.vercel.app/left-top-icon.png",
"url": "https://forestwork.vercel.app/",
"address": {
"@type": "PostalAddress",
"addressCountry": "Taiwan"
},
"sameAs": ["@teamforestwork", "@forestwork"]
})
}
]
}
}
})