-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
143 lines (138 loc) · 3.39 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
import process from 'node:process'
import { defineNuxtConfig } from 'nuxt/config'
import svgLoader from 'vite-svg-loader'
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
nitro: {
prerender: {
routes: ['/sitemap.xml', '/robots.txt'],
failOnError: false,
},
},
extends: ['@nuxt-themes/docus'],
modules: ['@unocss/nuxt'],
runtimeConfig: {
// Public keys that are exposed to the client
public: {
baseUrl: process.env.NUXT_PUBLIC_BASE_URL,
algolia: {
applicationId: process.env.NUXT_PUBLIC_ALGOLIA_APPLICATION_ID,
apiKey: process.env.NUXT_PUBLIC_ALGOLIA_SEARCH_API_KEY,
lang: 'zh-Hant-TW',
langAttribute: 'lang',
docSearch: {
indexName: 'rock070',
},
},
},
},
css: [
'@unocss/reset/tailwind.css',
'~/styles/themes.css',
'floating-vue/dist/style.css',
],
vite: {
plugins: [
svgLoader(),
],
},
content: {
ignores: [
'drafts',
],
navigation: {
fields: ['icon'],
},
// https://content.nuxtjs.org/api/configuration
documentDriven: {
globals: {
theme: {
where: [
{
_id: 'content:_theme.yml',
},
],
without: ['_'],
},
},
// Will use `theme` global to search for a fallback `layout` key.
layoutFallbacks: ['theme'],
},
},
app: {
head: {
htmlAttrs: {
lang: 'zh-Hant-TW',
},
title: 'rock070.me',
link: [
{ rel: 'icon', type: 'image/png', href: '/favicon.png' },
],
meta: [
{
name: 'viewport',
content: 'width=device-width, initial-scale=1',
},
{
name: 'description',
content:
'Rock070 的部落格網站,分享網頁前端學習心得與生活',
},
{
property: 'og:title',
content: 'Rock070 的部落格',
},
{
property: 'og:description',
content:
'Rock070 的部落格網站,分享網頁前端學習心得與生活',
},
{
property: 'og:url',
content: process.env.NUXT_PUBLIC_BASE_URL,
},
{
property: 'og:image',
content: process.env.NUXT_PUBLIC_BASE_URL && `${process.env.NUXT_PUBLIC_BASE_URL}/og-images/og-Rock070.png`,
},
{
property: 'og:type',
content: 'website',
},
{
property: 'og:locale',
content: 'zh_TW',
},
{
property: 'og:site_name',
content: 'Rock070 Blog',
},
{
name: 'twitter:card',
content: 'summary_large_image',
},
{
name: 'twitter:image',
content: process.env.NUXT_PUBLIC_BASE_URL && `${process.env.NUXT_PUBLIC_BASE_URL}/og-images/og-Rock070.png`,
},
{
name: 'twitter:site',
content: process.env.NUXT_PUBLIC_BASE_URL,
},
{
name: 'twitter:creator',
content: '@Rock070000',
},
{
name: 'twitter:description',
content:
'Rock070 的部落格網站,分享網頁前端學習心得與生活',
},
{
name: 'twitter:title',
content: 'Rock070 的部落格網站',
},
],
},
},
})