generated from undone-labs/nuxt-static
-
Notifications
You must be signed in to change notification settings - Fork 3
/
nuxt.config.js
146 lines (141 loc) · 5.67 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
// ///////////////////////////////////////////////////////////////////// Imports
// -----------------------------------------------------------------------------
import Path from 'path'
// /////////////////////////////////////////////////////////// Variables & Setup
// -----------------------------------------------------------------------------
const env = process.env.SERVER_ENV
const baseUrls = {
development: 'https://localhost',
stable: 'https://singularity-website.on.fleek.co/',
production: 'https://singularity.storage/'
}
const frontendPort = 10070
const seo = {
siteName: 'Singularity',
description: 'Singularity facilitates onboarding of large quantaties of data (PB-scale) to the Filecoin network in an efficient, secure, and flexible way.'
}
// ////////////////////////////////////////////////////////////////////// Export
// -----------------------------------------------------------------------------
export default defineNuxtConfig({
// ///////////////////////////////////////////////////// Runtime Configuration
// ---------------------------------------------------------------------------
runtimeConfig: {
public: {
siteUrl: env === 'development' ? `${baseUrls[env]}:${frontendPort}` : baseUrls[env],
serverFlag: env,
seo: {
siteName: seo.siteName
},
airtableToken: process.env.AIRTABLE_SINGULARITY_ACCESS_TOKEN
}
},
// ////////////////////////////////////////////////////////// Server & Bundler
// ---------------------------------------------------------------------------
vite: {
css: {
preprocessorOptions: {
scss: {
// make SCSS variables, functions and mixins globally accessible
additionalData: '@use "sass:math"; @import "@/assets/scss/settings.scss";'
}
}
},
assetsInclude: ['**/*.md']
},
build: {
transpile: ['@vuepic/vue-datepicker']
},
// //////////////////////////////////////////////// Custom Sass Theme Override
// ---------------------------------------------------------------------------
overrideTheming: {
themeName: ''
},
// //////////////////////////////////////////////////////////////// Dev Server
// ---------------------------------------------------------------------------
devServer: {
port: frontendPort,
host: process.env.NODE_ENV !== 'development' ? '0.0.0.0' : 'localhost',
...(process.env.NODE_ENV === 'development' && {
https: {
key: 'localhost_key.pem',
cert: 'localhost_cert.pem'
}
})
},
// /////////////////////////////////////////////////////////////////////// App
// ---------------------------------------------------------------------------
app: {
// -------------------------------------------------------------------- head
head: {
title: seo.siteName,
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: 'description', content: seo.description },
{ name: 'msapplication-TileColor', content: '#da532c' },
{ name: 'theme-color', content: '#ffffff' }
],
link: [
{ rel: 'apple-touch-icon', sizes: '120x120', href: '/favicon/apple-touch-icon.png' },
{ rel: 'icon', type: 'image/png', sizes: '32x32', href: '/favicon/favicon-32x32.png' },
{ rel: 'icon', type: 'image/png', sizes: '16x16', href: '/favicon/favicon-16x16.png' },
{ rel: 'manifest', href: '/favicon/site.webmanifest' },
{ rel: 'mask-icon', href: '/favicon/safari-pinned-tab.svg', color: '#5bbad5' }
]
}
},
// ////////////////////////////////////////////////////////////// Auto-imports
// ---------------------------------------------------------------------------
imports: {
presets: [{
from: 'pinia',
imports: []
}]
},
// ///////////////////////////////////////////////////////////// Global Styles
// ---------------------------------------------------------------------------
css: [
'@/assets/scss/main.scss'
],
// /////////////////////////////////////////////////////////////////// Modules
// ---------------------------------------------------------------------------
modules: [
'@pinia/nuxt',
'@/modules/eslint-nuxt3-globals',
'@nuxtjs/eslint-module',
'@nuxtjs/algolia',
// '@/modules/zero', // required
'@/modules/nuxt-module-plausible',
'@nuxt/content',
'@nuxtjs/plausible', // https://github.com/nuxt-modules/plausible
'nuxt-simple-robots', // https://github.com/harlan-zw/nuxt-simple-robots
'nuxt-simple-sitemap' // https://github.com/harlan-zw/nuxt-simple-sitemap
],
// ////////////////////////////////////////////////// [Module] @nuxtjs/algolia
// ---------------------------------------------------------------------------
algolia: {
disable: true,
apiKey: process.env.ALGOLIA_API_KEY,
applicationId: process.env.ALGOLIA_APPLICATION_ID,
indexName: `${process.env.ALGOLIA_INDEX_ID}__${env}`,
sources: [
{ path: Path.resolve(__dirname, 'content'), contentDirectoryName: 'content' }
]
},
// ////////////////////////////////////////////////// [Module] @nuxt/plausible
// ---------------------------------------------------------------------------
plausible: {
include: true,
domain: 'singularity.storage',
trackLocalhost: false,
autoOutboundTracking: true
},
// //////////////////////////////////////////////////// [Module] @nuxt/content
// ---------------------------------------------------------------------------
content: {
watch: false
},
// ////////////////////////////////////////////////////////// [Module] sitemap
// ---------------------------------------------------------------------------
sitemap: {}
})