-
Notifications
You must be signed in to change notification settings - Fork 41
/
nuxt.config.ts
104 lines (103 loc) · 2.58 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
import redirects from './redirects';
// 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'],
},
runtimeConfig: {
public: {
app: 'docs',
},
},
routeRules: { ...redirects },
experimental: {
defaults: {
nuxtLink: {
trailingSlash: 'remove',
},
},
},
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 ZK 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,
},
},
$production:
process.env.NUXT_SITE_ENV === 'production'
? {
gtag: {
id: 'G-ELFWXSL45V',
},
}
: {
gtag: {
enabled: false,
},
},
});