-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnuxt.config.ts
75 lines (74 loc) · 1.69 KB
/
nuxt.config.ts
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
import process from 'node:process'
const isVercel = process.argv.includes('--vercel')
export default defineNuxtConfig({
experimental: {
payloadExtraction: false,
},
devServer: {
port: 8888,
},
modules: [
'@unocss/nuxt',
'@vueuse/nuxt',
'@nuxtjs/sitemap',
'unplugin-icons/nuxt',
],
postcss: {
plugins: {
},
},
css: ['assets/styles/main.scss'],
site: {
url: 'https://fxzer.github.io',
},
app: {
baseURL: isVercel ? '/' : '/github-trends/', /* 根据环境决定路由前缀 */
pageTransition: {
name: 'fade-slide',
mode: 'out-in',
},
head: {
title: 'Github Trends',
meta: [
{
name: 'viewport',
content: 'width=device-width, initial-scale=1',
},
{
name: 'keywords',
content: 'github、trending、chart 、github-trends',
},
{
name: 'description',
content:
'Github 趋势一览',
},
{
charset: 'utf-8',
},
],
link: [
{
hid: 'icon',
rel: 'icon',
href: '/github-trends/favicon.ico',
},
{
hid: 'icon',
rel: 'icon',
href: '/github-trends/favicon.svg',
},
{
rel: 'apple-touch-icon',
sizes: '180x180',
href: '/github-trends/favicon.svg',
},
// 网址规范化
{ rel: 'canonical', href: 'https://github-trends-neon.vercel.app' },
{ rel: 'canonical', href: 'https://fxzer.github.io/github-trends' },
{ rel: 'canonical', href: 'https://fxzer.gitee.io/github-trends' },
],
script: [],
},
},
})