forked from matter-labs/zksync-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
136 lines (136 loc) · 3.74 KB
/
Copy pathnuxt.config.ts
File metadata and controls
136 lines (136 loc) · 3.74 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
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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
extends: ['@matterlabs/docs-nuxt-template'],
modules: ['nuxt-gtag', '@vite-pwa/nuxt'],
site: {
name: 'ZKsync Docs',
url: process.env.NUXT_SITE_ENV === 'production' ? 'https://docs.zksync.io' : 'https://staging-docs.zksync.io',
},
nitro: {
plugins: ['./plugins/code-snippet-import.ts'],
},
components: [
{
path: '~/components',
global: true,
},
],
runtimeConfig: {
public: {
app: 'docs',
},
},
experimental: {
defaults: {
nuxtLink: {
trailingSlash: 'remove',
},
},
// Avoid route-level _payload.json fetches that break on the current static hosting setup.
payloadExtraction: false,
},
pwa: {
selfDestroying: true,
strategies: 'generateSW',
registerType: 'autoUpdate',
workbox: {
cleanupOutdatedCaches: true,
cacheId: 'zksync-docs-prod',
},
manifest: {
name: 'ZKsync Developer Documentation',
short_name: 'ZKsync Docs',
description:
'ZKsync Docs bring you all information you need about our protocol, APIs, SDKs, ZK Stack, and ZKsync chains. Start with our guides and tutorials, or go deep into our architecture and protocol specification.',
theme_color: '#F2F2F2',
icons: [
{
src: '/zksync-icon_48.svg',
sizes: '48x48',
type: 'image/svg+xml',
},
{
src: '/zksync-icon_48.png',
sizes: '48x48',
type: 'image/png',
},
{
src: '/zksync-icon_64.png',
sizes: '64x64',
type: 'image/png',
},
{
src: '/zksync-maskable.png',
sizes: '128x128',
type: 'image/png',
purpose: 'maskable',
},
{
src: '/zksync-icon_180.png',
sizes: '180x180',
type: 'image/png',
},
{
src: '/zksync-icon_192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: '/zksync-icon_512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any',
},
],
},
},
icon: {
clientBundle: {
// scan all components in the project and include icons
scan: true,
// include all custom collections in the client bundle
includeCustomCollections: true,
// guard for uncompressed bundle size, will fail the build if exceeds
sizeLimitKb: 256,
icons: [
'heroicons:clipboard-document',
'heroicons:chevron-right-20-solid',
'heroicons:chevron-left-20-solid',
'heroicons:hashtag-20-solid',
'heroicons:chevron-down-20-solid',
'heroicons:moon-20-solid',
'heroicons:sun-20-solid',
'heroicons:x-mark-20-solid',
'heroicons:rocket-launch',
'heroicons:arrow-up-right-20-solid',
'heroicons:arrow-left-20-solid',
'heroicons:check-circle-16-solid',
'heroicons:beaker-solid',
'heroicons:rocket-launch-solid',
'heroicons:book-open-solid',
'heroicons:square-3-stack-3d-16-solid',
'heroicons:question-mark-circle',
'heroicons:document-magnifying-glass-16-solid',
'heroicons:rectangle-group',
'vscode-icons:file-type-bun',
'vscode-icons:file-type-npm',
'vscode-icons:file-type-pnpm',
'vscode-icons:file-type-yarn',
'vscode-icons:file-type-typescript',
'vscode-icons:file-type-solidity',
],
},
},
$production:
process.env.NUXT_SITE_ENV === 'production'
? {
gtag: {
id: 'G-ELFWXSL45V',
},
}
: {
gtag: {
enabled: false,
},
},
});