-
Notifications
You must be signed in to change notification settings - Fork 58
/
nuxt.config.ts
90 lines (86 loc) · 2.31 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
import { createResolver, logger, defineNuxtModule } from '@nuxt/kit'
import { $fetch } from 'ofetch'
import { version } from './package.json'
const { resolve } = createResolver(import.meta.url)
// That allows to overwrite these dependencies paths via `.env` for local development
const envModules = {
tokens: process?.env?.THEME_DEV_TOKENS_PATH || '@nuxt-themes/tokens',
elements: process?.env?.THEME_DEV_ELEMENTS_PATH || '@nuxt-themes/elements',
studio: process?.env?.THEME_DEV_STUDIO_PATH || '@nuxthq/studio',
typography: process?.env?.THEME_DEV_TYPOGRAPHY_PATH || '@nuxt-themes/typography'
}
const updateModule = defineNuxtModule({
meta: {
name: '@nuxt-themes/alpine'
},
setup (_, nuxt) {
if (nuxt.options.dev) {
$fetch('https://registry.npmjs.org/@nuxt-themes/alpine/latest').then((release) => {
if (release.version > version) {
logger.info(`A new version of Alpine (v${release.version}) is available: https://github.com/nuxt-themes/alpine/releases/latest`)
}
}).catch(() => {})
}
}
})
// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
app: {
head: {
htmlAttrs: {
lang: 'en'
}
}
},
extends: [envModules.typography, envModules.elements],
runtimeConfig: {
public: {
FORMSPREE_URL: process.env.FORMSPREE_URL
}
},
pages: true,
modules: [
envModules.tokens,
envModules.studio,
'@nuxt/content',
updateModule as any
],
components: [
{ path: resolve('./components'), global: true },
{ path: resolve('./components/content'), global: true },
{ path: resolve('./components/data-entry'), global: true }
],
css: [
resolve('./assets/main.css'),
],
colorMode: {
classSuffix: ''
},
pinceau: {
studio: true
},
content: {
documentDriven: true,
navigation: {
fields: ['navTitle']
},
highlight: {
theme: {
default: 'github-light',
dark: 'github-dark'
},
preload: ['json', 'js', 'ts', 'html', 'css', 'vue', 'diff', 'shell', 'markdown', 'yaml', 'bash', 'ini', 'c', 'cpp']
}
},
experimental: {
inlineSSRStyles: false
},
typescript: {
includeWorkspace: true
},
nitro: {
prerender: {
ignore: ['/__pinceau_tokens_config.json', '/__pinceau_tokens_schema.json']
}
},
})