-
Notifications
You must be signed in to change notification settings - Fork 34
/
nuxt.config.ts
109 lines (109 loc) · 3.12 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
// 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',
},
runtimeConfig: {
public: {
app: 'docs',
},
},
routeRules: {
'/build/tooling': { redirect: '/build/tooling/zksync-block-explorers' },
'/build/tooling/foundry': { redirect: '/build/tooling/foundry/overview' },
'/build/developer-reference/ethereum-differences': {
redirect: '/build/developer-reference/ethereum-differences/evm-instructions',
},
'/build/developer-reference/era-contracts': { redirect: '/build/developer-reference/era-contracts/l1-contracts' },
'/build/resources': { redirect: '/build/resources/glossary' },
'/zk-stack/concepts': { redirect: '/zk-stack/concepts/transaction-lifecycle' },
'/zk-stack/running-a-zk-chain': { redirect: '/zk-stack/running-a-zk-chain/locally' },
},
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,
},
},
});