-
Notifications
You must be signed in to change notification settings - Fork 274
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
138 lines (122 loc) · 3.11 KB
/
nuxt.config.ts
File metadata and controls
138 lines (122 loc) · 3.11 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
import { createResolver, useNuxt } from "@nuxt/kit";
import tailwindcss from "@tailwindcss/vite";
const { resolve } = createResolver(import.meta.url);
export default defineNuxtConfig({
extends: ["docus"],
site: {
name: "Inspira UI",
},
vite: {
plugins: [tailwindcss()],
},
// Ensure we use the local config module instead of the one bundled in the Docus layer.
hooks: {
"modules:before": function () {
const nuxt = useNuxt();
const localConfigModule = resolve("./modules/config");
for (const layer of nuxt.options._layers) {
layer.config.modules = (layer.config.modules || []).map((mod) => {
const entry = Array.isArray(mod) ? mod[0] : mod;
return typeof entry === "string" && entry.includes("/docus/modules/config")
? localConfigModule
: mod;
});
}
},
},
modules: [
"@nuxtjs/i18n",
"@nuxt/content",
"@nuxt/eslint",
"@nuxt/fonts",
"@nuxt/icon",
"@nuxt/image",
"@nuxt/scripts",
"@vueuse/nuxt",
"nuxt-gtag",
"@tresjs/nuxt",
],
plugins: [{ src: "./plugins/clarity.js", mode: "client" }],
ui: {
content: true,
mdc: true,
},
colorMode: {
preference: "dark",
fallback: "dark",
},
css: ["~/assets/css/main.css"],
i18n: {
// Use a public SITE URL for correct hreflang / SEO generation.
// Prefer `NUXT_PUBLIC_SITE_URL` (Vite/Nuxt public env) then `SITE_URL`.
baseUrl: process.env.NUXT_PUBLIC_SITE_URL || process.env.SITE_URL || "https://inspira-ui.com",
defaultLocale: "en",
locales: [
{
code: "en",
name: "English",
},
{
code: "cn",
name: "简体中文",
},
{
code: "fr",
name: "Français",
},
],
},
app: {
head: {
meta: [
{
name: "google-adsense-account",
content: process.env.NUXT_ADSENSE_ACCOUNT,
},
],
},
baseURL: process.env.NODE_ENV === "development" ? "/" : "/docs/",
},
components: [
{
path: "~/components/",
global: true,
pathPrefix: false,
ignore: ["**/index.ts", "**/shaders.ts", "**/types.ts"],
},
],
runtimeConfig: {
public: {
NUXT_CLARITY_ID: process.env.NUXT_CLARITY_ID,
NUXT_ADSENSE_ACCOUNT: process.env.NUXT_ADSENSE_ACCOUNT,
// Public site URL used by modules (e.g. i18n) for canonical/hreflang links.
SITE_URL: process.env.NUXT_PUBLIC_SITE_URL || process.env.SITE_URL,
},
},
llms: {
domain: "https://inspira-ui.com/",
title: "Inspira UI",
description:
"Inspira UI is a free and open-source Vue.js component library that provides a collection of beautiful and customizable components for building modern web applications.",
full: {
title: "Inspira UI Documentation",
description: "The complete Inspira UI documentation.",
},
},
content: {
database: {
bindingName: "DB",
type: "d1",
},
},
fonts: {
processCSSVariables: true,
families: [
{
name: "Geist",
provider: "google",
global: true,
},
],
},
});