Repository navigation
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
147 lines (146 loc) · 5.27 KB
/
Copy pathnuxt.config.ts
File metadata and controls
147 lines (146 loc) · 5.27 KB
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
import { SUPPORTED_LOCALES } from "./app/utils/locales";
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
modules: ["@nuxt/ui", "@vercel/speed-insights", "@nuxtjs/mdc"],
css: ["~/assets/css/main.css"],
compatibilityDate: "2025-07-15",
nitro: {
cloudflare: {
deployConfig: true,
wrangler: {
name: "elegon-web",
keep_vars: true,
workers_dev: true,
},
},
},
devtools: { enabled: true },
// The site is designed as a dark, in-world experience, so light mode is disabled.
ui: {
colorMode: false,
},
routeRules: {
"/toolbox/**": {
headers: {
"Cache-Control": "private, no-store",
// Preserve the browser Origin on the loopback POST without exposing its URL.
"Referrer-Policy": "origin",
"X-Robots-Tag": "noindex, nofollow",
},
},
"/api/toolbox/**": { headers: { "Cache-Control": "private, no-store" } },
"/account": {
headers: { "Cache-Control": "private, no-store", "X-Robots-Tag": "noindex, nofollow" },
},
...Object.fromEntries(
SUPPORTED_LOCALES.map((locale) => [
`/${locale}/account`,
{ headers: { "Cache-Control": "private, no-store", "X-Robots-Tag": "noindex, nofollow" } },
]),
),
"/feedback/**": {
headers: {
"Cache-Control": "private, no-store",
"X-Robots-Tag": "noindex, nofollow",
"Referrer-Policy": "no-referrer",
},
},
"/api/feedback/**": { headers: { "Cache-Control": "private, no-store" } },
"/auth/**": { headers: { "Cache-Control": "no-store", "Referrer-Policy": "no-referrer" } },
"/api/account/**": { headers: { "Cache-Control": "private, no-store" } },
"/api/account": { headers: { "Cache-Control": "private, no-store" } },
// Serve the landing page from the edge cache and refresh it in the background.
"/": { isr: 600 },
},
runtimeConfig: {
authServiceUrl: "https://auth.elegon.app",
authWebsiteApiKey: "",
discordClientId: "",
discordClientSecret: "",
patreonClientId: "",
patreonClientSecret: "",
accountSiteOrigin: "https://elegon.app",
feedbackSiteUrl: "https://feedback.elegon.app",
accountUsRealmUrl: "https://clockworklabsspacetime-production-7da0.up.railway.app",
accountEuRealmUrl: "https://clockworklabsspacetime-production-7ab4.up.railway.app",
accountRealmDatabase: "elegon",
public: {
// Canonical origin used for SEO tags, the sitemap and robots.txt.
// Falls back to the request origin when unset.
siteUrl: process.env.NUXT_PUBLIC_SITE_URL || "",
},
patreonAccessToken:
process.env.PATREON_ACCESS_TOKEN || process.env.NUXT_PATREON_ACCESS_TOKEN || "",
patreonCampaignId:
process.env.PATREON_CAMPAIGN_ID || process.env.NUXT_PATREON_CAMPAIGN_ID || "",
patreonUserAgent:
process.env.PATREON_USER_AGENT || process.env.NUXT_PATREON_USER_AGENT || "Elegon Website",
patreonTier1Id: process.env.PATREON_TIER_1_ID || process.env.NUXT_PATREON_TIER_1_ID || "",
patreonTier1Label:
process.env.PATREON_TIER_1_LABEL ||
process.env.NUXT_PATREON_TIER_1_LABEL ||
"Legendary Supporters",
patreonTier2Id: process.env.PATREON_TIER_2_ID || process.env.NUXT_PATREON_TIER_2_ID || "",
patreonTier2Label:
process.env.PATREON_TIER_2_LABEL ||
process.env.NUXT_PATREON_TIER_2_LABEL ||
"Epic Supporters",
patreonTier3Id: process.env.PATREON_TIER_3_ID || process.env.NUXT_PATREON_TIER_3_ID || "",
patreonTier3Label:
process.env.PATREON_TIER_3_LABEL ||
process.env.NUXT_PATREON_TIER_3_LABEL ||
"Rare Supporters",
},
app: {
head: {
title: "Elegon",
htmlAttrs: {
lang: "en",
class: "dark",
},
meta: [
{ name: "theme-color", content: "#0d0a08" },
{ name: "color-scheme", content: "dark" },
{ name: "application-name", content: "Elegon" },
{ name: "apple-mobile-web-app-title", content: "Elegon" },
{ name: "format-detection", content: "telephone=no" },
],
link: [
{ rel: "icon", href: "/favicon.ico", sizes: "any" },
{ rel: "icon", type: "image/png", href: "/icon-512.png" },
{ rel: "apple-touch-icon", href: "/apple-touch-icon.png" },
{ rel: "manifest", href: "/site.webmanifest" },
],
style: [
// Pin cascade layer order before any other CSS. In production, component styles are
// inlined ahead of Tailwind's stylesheet; without this, a component using
// `@layer components` would rank below Tailwind's `base` reset (e.g. losing padding).
{
innerHTML: "@layer theme, base, components, utilities;",
tagPriority: "critical",
},
],
script: [
{
src: "https://umami-production-b655.up.railway.app/script.js",
defer: true,
"data-website-id": "8c227760-afe1-4453-8018-daba25e9cc91",
"data-performance": true,
},
// Flags JS support before first paint so scroll-reveal content never flashes.
{
innerHTML: "document.documentElement.classList.add('js')",
tagPosition: "head",
},
],
},
},
appConfig: {
ui: {
colors: {
primary: "amber",
neutral: "stone",
},
},
},
});