-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnuxt.config.ts
119 lines (116 loc) · 3.07 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
110
111
112
113
114
115
116
117
118
119
// https://nuxt.com/docs/api/configuration/nuxt-config
import { createResolver } from '@nuxt/kit'
const { resolve } = createResolver(import.meta.url)
export default defineNuxtConfig({
runtimeConfig: {
public: {
repo_name: process.env.repo_name,
repo_url: process.env.repo_url
},
},
target: 'static',
buildModules: [
'@nuxt/image'
],
modules: [
'@pinia/nuxt',
'nuxt-content-assets',
'@nuxt/content',
'@vueuse/nuxt',
],
app: {
baseURL: '/Wasm4Learn/',
head: {
title: 'Wasm4Learn',
meta: [
{
name: 'description',
content: 'An interactive tutorial platform to introduce you to the first commands in different languages like R and Python'
}
],
script: [
{
src: "https://cdn.jsdelivr.net/pyodide/v0.23.4/full/pyodide.js",
},
{
src: "https://cdn.jsdelivr.net/npm/@ruby/wasm-wasi@latest/dist/browser.umd.js",
},
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: 'https://www.france-bioinformatique.fr/wp-content/uploads/logo-ifb-couleur.svg' }
],
},
},
ssr: false,
nitro: {
serveStatic: true,
},
content: {
sources: {
github: {
prefix: '', // Prefix for routes used to query contents
driver: 'github', // Driver used to fetch contents (view unstorage documentation)
repo: "IFB-ElixirFr/Wasm4Learn-content",
branch: "main",
dir: "content", // Directory where contents are located. It could be a subdirectory of the repository.
// Imagine you have a blog inside your content folder. You can set this option to `content/blog` with the prefix option to `/blog` to avoid conflicts with local files.
},
},
markdown: {
remarkPlugins: ['remark-math'],
rehypePlugins: {
'rehype-katex': {
output: 'html' // the default value is 'htmlAndMathml'
}
}
},
experimental: {
clientDB: true
},
navigation: {
fields: ['_dir']
},
highlight: {
preload: [
'r'
],
theme: {
// Default theme (same as single string)
default: 'github-light',
// Theme used if `html.dark`
dark: 'github-dark',
// Theme used if `html.sepia`
sepia: 'monokai'
}
},
},
css: ['vuetify/lib/styles/main.sass',
'@mdi/font/css/materialdesignicons.min.css',],
build: {
transpile: ['vuetify', '@pinia/nuxt'],
},
vite: {
define: {
'process.env.DEBUG': false,
},
},
pinia: {
autoImports: [
// automatically imports `defineStore`
'defineStore', // import { defineStore } from 'pinia'
['defineStore', 'definePiniaStore'], // import { defineStore as definePiniaStore } from 'pinia'
],
},
routeRules: {
'/**': { prerender: true },
'/dashboard/**': { ssr: false }
},
render: {
static: {
setHeaders(res: any) {
res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp')
res.setHeader('Cross-Origin-Opener-Policy', 'same-origin')
}
}
},
})