-
Notifications
You must be signed in to change notification settings - Fork 1
/
nuxt.config.ts
executable file
·105 lines (103 loc) · 2.7 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
import Icons from "unplugin-icons/vite";
import Components from "unplugin-vue-components/vite";
import IconsResolver from "unplugin-icons/resolver";
import viteCompression from "vite-plugin-compression";
import { GenerateRoutes } from "./tools/contentRoutes";
import { GenerateDecap } from "./tools/configs-generators";
export default defineNuxtConfig({
ssr: true,
css: ["@/assets/scss/base.scss", "@/assets/scss/extra.scss"],
modules: ["@nuxt/image-edge", "@nuxt/ui", "@nuxt/content"],
extends: ["nuxt-seo-kit"],
runtimeConfig: {
app: {
title: process.env.SITE_NAME,
description: process.env.SITE_DESCRIPTIONS,
titleFirst: process.env.SITE_TITLE_FIRST,
titleSecond: process.env.SITE_TITLE_SECOND,
github: process.env.GITHUB,
linkedin: process.env.LINKEDIN,
twitter: process.env.TWITTER,
giscus: process.env.GISCUS,
giscus_term: process.env.GISCUS_TERM,
giscus_category: process.env.GISCUS_CATEGORY,
giscus_category_id: process.env.GISCUS_CATEGORY_ID,
giscus_repo: process.env.GISCUS_REPO,
giscus_repo_id: process.env.GISCUS_REPO_ID,
giscus_mapping: process.env.GISCUS_MAPPING,
giscus_theme: process.env.GISCUS_THEME,
giscus_reaction: process.env.GISCUS_REACTION,
giscus_locale: process.env.APP_LOCALE,
favicon: "/favicon.ico",
icon: "/icons.png",
color: "#e5e7eb",
},
public: {
siteUrl: process.env.PUBLIC_SITE_URL,
siteName: process.env.SITE_NAME,
siteDescription: process.env.SITE_DESCRIPTIONS,
language: process.env.SITE_LANGUAGE,
},
},
app: {
pageTransition: { name: "page", mode: "in-out" },
},
vite: {
plugins: [
viteCompression({ algorithm: "brotliCompress" }),
Components({
resolvers: [
IconsResolver({
prefix: "Icon",
}),
],
}),
Icons(),
],
build: {
watch: {},
sourcemap: false,
minify: true,
rollupOptions: { treeshake: false },
},
},
nitro: {
static: true,
compressPublicAssets: true,
minify: true,
prerender: {
crawlLinks: false,
routes: GenerateRoutes(["blogs", "pages", "category"]),
},
},
experimental: {
payloadExtraction: false,
treeshakeClientOnly: false,
inlineSSRStyles: false,
},
image: {
format: ["webp"],
provider: "ipx",
ipx: {
modifiers: {
quality: "80",
format: ["webp"],
},
},
},
vue: {
compilerOptions: {
isCustomElement: (tag) => ["giscus-widget"].includes(tag),
},
},
hooks: {
"build:done": () => {
GenerateDecap();
},
},
content: {
highlight: {
theme: "github-dark",
},
},
});