-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathnuxt.config.js
168 lines (166 loc) · 4.34 KB
/
nuxt.config.js
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
import webpack from 'webpack'
export default {
target: process.env.DEPLOY_TARGET || 'server',
ssr: true,
head: {
htmlAttrs: {
lang: process.env.NUXT_LOCALE,
dir: 'rtl'
},
meta: [
{ charset: 'utf-8' },
{ name: 'theme-color', content: '#4927d0' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1' },
{ hid: 'og:site_name', property: 'og:site_name', content: 'دليل مبرمج' },
{ hid: 'og:type', property: 'og:type', content: 'website' },
{
hid: 'twitter:card',
name: 'twitter:card',
content: 'summary_large_image'
},
{
hid: 'og:image',
property: 'og:image',
content: 'https://www.dalilmobarmg.com/dalilmobarmg-card.png'
},
{
hid: 'og:image:secure_url',
property: 'og:image:secure_url',
content: 'https://www.dalilmobarmg.com/dalilmobarmg-card.png'
},
{
hid: 'og:image:alt',
property: 'og:image:alt',
content: 'دليل مبرمج'
},
{
hid: 'twitter:image',
name: 'twitter:image',
content: 'https://www.dalilmobarmg.com/dalilmobarmg-card.png'
}
],
link: [
{ rel: 'icon', type: 'image/png', href: '/favicon.png' },
{ rel: 'preconnect', href: 'https://www.google-analytics.com' },
{
rel: 'stylesheet',
type: 'text/css',
href: 'https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css'
}
],
bodyAttrs: {
class: [
'font-sans font-medium bg-light-surface dark:bg-dark-surface text-light-onSurfacePrimary dark:text-dark-onSurfacePrimary' // transition-colors duration-300 ease-linear
]
}
},
buildModules: [
'@nuxtjs/color-mode',
'@nuxtjs/style-resources',
'@nuxtjs/svg',
'@nuxtjs/tailwindcss',
'@nuxtjs/pwa',
'@nuxtjs/google-analytics',
],
modules: [
'@nuxt/http',
'@nuxt/content',
'nuxt-i18n',
'vue-scrollto/nuxt'
],
googleAnalytics: {
id: process.env.GOOGLE_ANALYTICS_ID || 'UA-186983539-1',
},
pwa: {
manifest: {
name: 'دليل مبرمج'
},
meta: {
name: 'دليل مبرمج',
description: 'منصة دليل مبرمج: غير ربحية مفتوحة المصدر وهي بوابتك اﻷمثل لعالم البرمجة ودليلك في طريقك إلى احتراف البرمجة وعلوم الحاسوب',
theme_color: '#4927d0',
lang: 'ar',
nativeUI: true,
}
},
// Auto import components, see https://github.com/nuxt/components
components: true,
colorMode: {
preference: 'light' // disable system
},
content: {
liveEdit: false,
markdown: {
prism: {
theme: 'prism-themes/themes/prism-material-oceanic.css'
}
}
},
css: [
'~/assets/css/main.scss',
'codemirror/lib/codemirror.css',
'codemirror/theme/material-palenight.css',
],
plugins: [
'~/plugins/i18n',
'~/plugins/directives',
'~/plugins/intersection-observer.client.js',
'~/plugins/vue-observe-visibility.client.js',
'~/plugins/vue-scrollactive',
{src: '~plugins/vue-codemirror', ssr: false },
],
env: {
URL: process.env.URL || false,
},
publicRuntimeConfig: {
dalilLocale: process.env.NUXT_LOCALE || 'ar',
slackInvitationLink: process.env.SLACK_INVITATION_LINK || '#',
GithubLink: process.env.GITHUB_LINK || 'https://github.com/ebrahimMaher/dalilmobarmg',
facebookGroupLink: process.env.FACEBOOK_GROUP || 'https://www.facebook.com/groups/3585515441546997',
},
loading: { color: '#4927d0' },
generate: {
fallback: false,
routes: ['/', '404']
},
i18n: {
strategy: 'no_prefix',
locales: [
{
code: 'ar',
iso: 'ar',
file: 'ar.js',
name: 'العربية',
domain: 'https://www.dalilmobarmg.com'
},
],
vueI18n: {
fallbackLocale: 'ar'
},
defaultLocale: 'ar',
parsePages: false,
detectBrowserLanguage: false,
seo: false,
lazy: true,
langDir: 'i18n/'
},
build: {
html: {
minify: {
minifyCSS: false,
minifyJS: false,
}
},
plugins: [
new webpack.IgnorePlugin({
resourceRegExp: /^\.\/locale$/,
contextRegExp: /moment$/
})
],
loaders: {
vue: {
prettify: false
}
}
},
}