-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
92 lines (80 loc) · 1.82 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
nitro: {
preset: "vercel"
},
sourcemap: {
client: true,
server: true,
},
nitro: {
prerender: {
crawlLinks: true,
routes: ['/sitemap.xml'],
},
},
site: {
url: "https://blog-kenryus.vercel.app",
indexable: true,
},
sitemap: {
sources: [
'/api/posts/url'
]
},
robots: {
enabled: true,
allow: ['/'],
disallow: ['/articleManager'],
sitemap: '/sitemap.xml',
blockNonSeoBots: true,
},
routeRules: {
'/articleManager/**': { index: false, ssr: false },
'/': { swr: 3600 },
'/posts': { swr: 3600, sitemap: {changefreq: 'daily', priority: 0.3 } },
'/posts/**': { swr: 3600 },
'/posts/search': {ssr: false, index: false },
'/about': { ssr: true },
'/api/**': { cors: true }
},
image: {
screens: {
'xs': 256,
'sm': 256,
'md': 256,
'lg': 256,
'xl': 256,
'xxl': 256,
'2xl': 256
},
},
pages: true,
app: {
head: {
htmlAttrs: {
lang: 'ja',
},
link: [{
rel: "icon",
type: "image/svg",
href: "/favicon.svg"
}],
charset: 'utf-8',
viewport: 'width=device-width, initial-scale=1, user-scalable=yes',
}
},
runtimeConfig: {
POSTGRES_DATABASE: process.env.POSTGRES_DATABASE,
POSTGRES_HOST: process.env.POSTGRES_HOST,
POSTGRES_PASSWORD: process.env.POSTGRES_PASSWORD,
POSTGRES_URL: process.env.POSTGRES_URL,
POSTGRES_USER: process.env.POSTGRES_USER,
CMS_PASSWD: process.env.CMS_PASSWD,
public: {
DEFAULT_IMAGE_ALT: "/default.svg, default image of blog site"
}
},
modules: ['nuxt-icon', '@nuxt/image', '@nuxtjs/robots', '@nuxtjs/sitemap']
})