-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
110 lines (108 loc) · 2.59 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
// https://nuxt.com/docs/api/configuration/nuxt-config
import listRedirects from "./utils/redirect";
export default defineNuxtConfig({
app: {
head: {
link: [{ rel: "icon", type: "image/webp", href: "/img/logo.webp" }],
/* script: [
{
src: "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5406721051491594",
async: true,
crossorigin: "anonymous",
type: "text/partytown",
},
], */
},
},
modules: [
"@nuxtjs/tailwindcss",
"@nuxt-alt/proxy",
"nuxt-icon",
"@nuxtjs/strapi",
"@nuxtjs/partytown",
"@nuxt/image",
"nuxt-schema-org",
"@vueuse/nuxt",
[
"@nuxtjs/google-fonts",
{
families: {
Merriweather: true,
"Merriweather+Sans": true,
Catamaran: true,
download: true,
inject: true,
},
},
],
],
extends: ['nuxt-umami'],
routeRules: {
"/": { isr: 60 * 15 },
"/blog/**": { isr: 60 * 25 },
"/uploads/**": { isr: 60 * 60 * 24 * 5 },
"/sitemap.xml": { isr: 60 * 60 * 24 },
"/rss.xml": { isr: 60 * 60 * 24 * 3 },
...listRedirects,
},
nitro: {
storage: {
cache: { driver: "redis", url: process.env.REDIS_URL },
},
},
image: {
providers: {
localImageSharp: {
provider: "~/providers/localImageSharp",
options: {
baseURL: `/uploads/`,
},
},
},
},
proxy: {
proxies: {
// Using the proxy instance
"/uploads/": {
target: process.env.STRAPI_URL + "/uploads/",
changeOrigin: true,
rewrite: (path: string) => path.replace(/^\/uploads/, ""),
},
},
},
vue: {
defineModel: true,
propsDestructure: true,
},
strapi: {
url: process.env.STRAPI_URL || "http://localhost:1337",
prefix: "/api",
version: "v4",
cookie: {},
cookieName: "strapi_jwt",
},
tailwindcss: {
cssPath: "~/assets/css/index.css",
configPath: "~/tailwind.config.ts",
},
runtimeConfig: {
public: {
siteUrl:
process.env.NUXT_PUBLIC_SITE_URL || "https://journalducuistot.fr/",
titleSeparator: "|",
siteName: "Journal du cuistot",
siteDescription:
"Bienvenu sur le journal du cuistot, un blog de recettes de cuisine d'un globe trotter",
language: "fr-FR", // prefer more explicit language codes like `en-AU` over `en`
},
},
schemaOrg: {
canonicalHost: "https://journalducuistot.fr/",
},
/* devServer: {
https: {
key: "localhost-key.pem",
cert: "localhost.pem",
},
}, */
});